From 4f35637a297640e6274771e23c1960f748196350 Mon Sep 17 00:00:00 2001 From: joewitt Date: Fri, 1 May 2015 16:17:47 -0400 Subject: [PATCH] NIFI-557 fixed the correct test and removed extraneous/duplicative ones - build now works Signed-off-by: joewitt --- .../impl/ClusterManagerProtocolSenderImplTest.java | 9 +++------ .../protocol/impl/SocketProtocolListenerTest.java | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java index ab10b018a5..5bfb5ed39a 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java @@ -41,9 +41,6 @@ import static org.mockito.Mockito.when; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -/** - * @author unattributed - */ public class ClusterManagerProtocolSenderImplTest { private InetAddress address; @@ -90,7 +87,7 @@ public class ClusterManagerProtocolSenderImplTest { when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE); when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new FlowResponseMessage()); FlowRequestMessage request = new FlowRequestMessage(); - request.setNodeId(new NodeIdentifier("id", "api-address", 1, address.getHostAddress(), port)); + request.setNodeId(new NodeIdentifier("id", "api-address", 1, "localhost", port)); FlowResponseMessage response = sender.requestFlow(request); assertNotNull(response); } @@ -101,7 +98,7 @@ public class ClusterManagerProtocolSenderImplTest { when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE); when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new PingMessage()); FlowRequestMessage request = new FlowRequestMessage(); - request.setNodeId(new NodeIdentifier("id", "api-address", 1, address.getHostAddress(), port)); + request.setNodeId(new NodeIdentifier("id", "api-address", 1, "localhost", port)); try { sender.requestFlow(request); fail("failed to throw exception"); @@ -125,7 +122,7 @@ public class ClusterManagerProtocolSenderImplTest { } }); FlowRequestMessage request = new FlowRequestMessage(); - request.setNodeId(new NodeIdentifier("id", "api-address", 1, address.getHostAddress(), port)); + request.setNodeId(new NodeIdentifier("id", "api-address", 1, "localhost", port)); try { sender.requestFlow(request); fail("failed to throw exception"); diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/SocketProtocolListenerTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/SocketProtocolListenerTest.java index 7a91c2987e..bc10c20fb1 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/SocketProtocolListenerTest.java +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster-protocol/src/test/java/org/apache/nifi/cluster/protocol/impl/SocketProtocolListenerTest.java @@ -27,8 +27,8 @@ import org.apache.nifi.cluster.protocol.jaxb.JaxbProtocolContext; import org.apache.nifi.cluster.protocol.jaxb.message.JaxbProtocolUtils; import org.apache.nifi.cluster.protocol.message.PingMessage; import org.apache.nifi.cluster.protocol.message.ProtocolMessage; -import org.apache.nifi.cluster.protocol.testutils.DelayedProtocolHandler; -import org.apache.nifi.cluster.protocol.testutils.ReflexiveProtocolHandler; +import org.apache.nifi.cluster.protocol.impl.testutils.DelayedProtocolHandler; +import org.apache.nifi.cluster.protocol.impl.testutils.ReflexiveProtocolHandler; import org.apache.nifi.io.socket.ServerSocketConfiguration; import org.apache.nifi.io.socket.SocketConfiguration; import org.apache.nifi.io.socket.SocketUtils;