[TEST] Move SimpleNettyTransportTests to expected exception
Replaced try catch with expected exception, since no additional check was done on the exception thrown.
This commit is contained in:
parent
338766fd4d
commit
e5b174ff77
|
@ -43,13 +43,8 @@ public class SimpleNettyTransportTests extends AbstractSimpleTransportTests {
|
|||
return transportService;
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = ConnectTransportException.class)
|
||||
public void testConnectException() {
|
||||
try {
|
||||
serviceA.connectToNode(new DiscoveryNode("C", new InetSocketTransportAddress("localhost", 9876), Version.CURRENT));
|
||||
fail();
|
||||
} catch (ConnectTransportException e) {
|
||||
// all is well
|
||||
}
|
||||
serviceA.connectToNode(new DiscoveryNode("C", new InetSocketTransportAddress("localhost", 9876), Version.CURRENT));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue