NIFI-557 fixed the correct test and removed extraneous/duplicative ones - build now works

Signed-off-by: joewitt <joewitt@apache.org>
This commit is contained in:
joewitt 2015-05-01 16:17:47 -04:00
parent 7853e3c165
commit 4f35637a29
2 changed files with 5 additions and 8 deletions

View File

@ -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");

View File

@ -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;