[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:
javanna 2015-02-03 15:47:42 +01:00 committed by Luca Cavanna
parent 338766fd4d
commit e5b174ff77
1 changed files with 2 additions and 7 deletions

View File

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