> +
> + @Test
> + public void testSocketFinderAllowedInterfacesAllPublic() throws Exception
> {
> + SocketOpen socketOpen = selectOpenSocket(PUBLIC_IP);
> + ConcurrentOpenSocketFinder finder = new
> ConcurrentOpenSocketFinder(socketOpen, nodeRunning, userExecutor);
> + HostAndPort result = finder.findOpenSocketOnNode(node, 22, 2000,
> MILLISECONDS);
> + assertEquals(result, HostAndPort.fromParts(PUBLIC_IP, 22));
> + }
> +
> + @Test
> + public void testSocketFinderAllowedInterfacesAllPrivate() throws
> Exception {
> + SocketOpen socketOpen = selectOpenSocket(PRIVATE_IP);
> + ConcurrentOpenSocketFinder finder = new
> ConcurrentOpenSocketFinder(socketOpen, nodeRunning, userExecutor);
> + HostAndPort result = finder.findOpenSocketOnNode(node, 22, 2000,
> MILLISECONDS);
> + assertEquals(result, HostAndPort.fromParts(PRIVATE_IP, 22));
> + }
What are these two testing? That, if `ALL` is set, it's capable of finding both
public and private? In that case, would it be more accurate to set up the tests
so that **both** addresses are listening (but one earlier than the other), and
showing that the finder finds the earlier one in both cases?
Does that make some kind of sense? ;-)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/341/files#r11467176