Tests with NioNetworkHandler as peer work now

This commit is contained in:
2016-06-18 23:09:23 +02:00
parent 0fadb40c6c
commit ae2120675f
5 changed files with 64 additions and 49 deletions

View File

@ -194,12 +194,11 @@ public class NetworkHandlerTest {
assertThat(response.getData(), is(data));
}
@Test(timeout = 5_000, expected = NodeException.class)
@Test(expected = NodeException.class)
public void ensureCustomMessageWithoutResponseYieldsException() throws Exception {
byte[] data = cryptography().randomBytes(8);
data[0] = (byte) 0;
CustomMessage request = new CustomMessage("test request", data);
node.startup();
CustomMessage response = nodeNetworkHandler.send(peerAddress.toInetAddress(), peerAddress.getPort(), request);