You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/05/01 20:24:40 UTC

[23/26] incubator-nifi git commit: NIFI-557: modified unit test to connect to localhost, rather than the IP address of localhost, as DNS and multiple NIC cards can cause unit tests to fail otherwise

NIFI-557: modified unit test to connect to localhost, rather than the IP address of localhost, as DNS and multiple NIC cards can cause unit tests to fail otherwise


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/6394c8ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/6394c8ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/6394c8ee

Branch: refs/heads/develop
Commit: 6394c8ee40be6053595a48c9aab76318e5ceae6f
Parents: 73a368f
Author: Mark Payne <ma...@hotmail.com>
Authored: Fri May 1 11:37:24 2015 -0400
Committer: Mark Payne <ma...@hotmail.com>
Committed: Fri May 1 11:37:24 2015 -0400

----------------------------------------------------------------------
 .../protocol/impl/ClusterManagerProtocolSenderImplTest.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/6394c8ee/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java
index 86179c8..9e4237f 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-cluster/src/test/java/org/apache/nifi/cluster/protocol/impl/ClusterManagerProtocolSenderImplTest.java
@@ -95,11 +95,10 @@ public class ClusterManagerProtocolSenderImplTest {
 
     @Test
     public void testRequestFlow() throws Exception {
-
         when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE);
         when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new FlowResponseMessage());
         final 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));
         final FlowResponseMessage response = sender.requestFlow(request);
         assertNotNull(response);
     }
@@ -110,7 +109,7 @@ public class ClusterManagerProtocolSenderImplTest {
         when(mockHandler.canHandle(any(ProtocolMessage.class))).thenReturn(Boolean.TRUE);
         when(mockHandler.handle(any(ProtocolMessage.class))).thenReturn(new PingMessage());
         final 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");
@@ -134,7 +133,7 @@ public class ClusterManagerProtocolSenderImplTest {
             }
         });
         final 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");