From 002ccd34749862f5e43376d8c8518f4dc0c3f0bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 16 Oct 2015 08:30:18 +0200 Subject: [PATCH] Use reply-with-successful where appropriate --- .../java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index c8a834a..77573c0 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -1605,8 +1605,7 @@ public class DefaultFcpClientTest { .uri("KSK@foo.txt") .execute(); connectNode(); - List lines = fcpServer.collectUntil(is("Hello")); - String identifier = extractIdentifier(lines); + readMessage("Hello", this::matchesDirectClientPut); replyWithGeneratedUri(); replyWithPutSuccessful(identifier); assertThat(key.get().get().getKey(), is("KSK@foo.txt")); @@ -1699,8 +1698,8 @@ public class DefaultFcpClientTest { connectAndAssert(() -> matchesClientPutDiskDir("Verbosity=1")); replyWithSimpleProgress(1, 2, 3, 4, 5, 6, true, 8); replyWithSimpleProgress(11, 12, 13, 14, 15, 16, false, 18); - fcpServer.writeLine("PutSuccessful", "Identifier=" + identifier, "URI=CHK@abc", "EndMessage"); - assertThat(key.get().get().getKey(), is("CHK@abc")); + replyWithPutSuccessful(identifier); + assertThat(key.get().get().getKey(), is("KSK@foo.txt")); assertThat(requestProgress, contains( isRequestProgress(1, 2, 3, 4, 5, 6, true, 8), isRequestProgress(11, 12, 13, 14, 15, 16, false, 18) -- 2.7.4