From: David ‘Bombe’ Roden Date: Thu, 15 Oct 2015 19:21:06 +0000 (+0200) Subject: Add test for protocol error when reloading plugin X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=02ab574b5554f822f0b1899eac24c4229c83e263;p=jFCPlib.git Add test for protocol error when reloading plugin --- diff --git a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java index 8adf900..b21e15e 100644 --- a/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java +++ b/src/test/java/net/pterodactylus/fcp/quelaton/DefaultFcpClientTest.java @@ -1030,6 +1030,15 @@ public class DefaultFcpClientTest { verifyPluginInfo(pluginInfo); } + @Test + public void protocolErrorIsRecognizedAsFailure() + throws InterruptedException, ExecutionException, IOException { + Future> pluginInfo = fcpClient.reloadPlugin().plugin(CLASS_NAME).execute(); + connectAndAssert(() -> matchReloadPluginMessage()); + replyWithProtocolError(); + assertThat(pluginInfo.get().isPresent(), is(false)); + } + private Matcher> matchReloadPluginMessage() { return matchesFcpMessage( "ReloadPlugin",