Mercurial > stress-tester
changeset 1003:a7c986455443
minor
author | Devel 2 |
---|---|
date | Fri, 04 Oct 2019 14:56:43 +0200 |
parents | 43f0378228df |
children | 7ace98380747 |
files | stress-tester/src/test/java/com/passus/st/client/TestClientHandler.java stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterTest.java stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterWorker2Test.java |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/stress-tester/src/test/java/com/passus/st/client/TestClientHandler.java Fri Oct 04 12:50:51 2019 +0200 +++ b/stress-tester/src/test/java/com/passus/st/client/TestClientHandler.java Fri Oct 04 14:56:43 2019 +0200 @@ -21,8 +21,7 @@ CHANNEL_INACTIVE, DATA_WRITTEN, DATA_RECEIVED, - ERROR_OCCURED, - USER + ERROR_OCCURRED } public static final int DEFAULT_TIMEOUT = 5_000; @@ -114,19 +113,21 @@ public void add(ClientEvent event) { synchronized (this) { events.add(event); + notifyAll(); } } public void add(EventType type, ChannelContext context) { synchronized (this) { events.add(ClientEvent.create(type, context)); + notifyAll(); } } @Override public final void errorOccurred(ChannelContext context, Throwable cause) throws Exception { synchronized (this) { - ClientEvent event = ClientEvent.create(EventType.ERROR_OCCURED, context); + ClientEvent event = ClientEvent.create(EventType.ERROR_OCCURRED, context); event.setCause(cause); add(event); doErrorOccured(context, cause);
--- a/stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterTest.java Fri Oct 04 12:50:51 2019 +0200 +++ b/stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterTest.java Fri Oct 04 14:56:43 2019 +0200 @@ -150,7 +150,7 @@ AssertJUnit.assertEquals(EventType.CHANNEL_REGISTERED, handler.get(0).getType()); ClientEvent clientEvent = handler.get(1); - AssertJUnit.assertEquals(EventType.ERROR_OCCURED, clientEvent.getType()); + AssertJUnit.assertEquals(EventType.ERROR_OCCURRED, clientEvent.getType()); AssertJUnit.assertTrue(clientEvent.getCause() instanceof ConnectException); AssertJUnit.assertTrue(clientEvent.getCause().getMessage().startsWith("Connection refused")); }
--- a/stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterWorker2Test.java Fri Oct 04 12:50:51 2019 +0200 +++ b/stress-tester/src/test/java/com/passus/st/emitter/nio/NioEmitterWorker2Test.java Fri Oct 04 14:56:43 2019 +0200 @@ -149,7 +149,7 @@ AssertJUnit.assertEquals(EventType.CHANNEL_REGISTERED, handler.get(0).getType()); ClientEvent clientEvent = handler.get(1); - AssertJUnit.assertEquals(EventType.ERROR_OCCURED, clientEvent.getType()); + AssertJUnit.assertEquals(EventType.ERROR_OCCURRED, clientEvent.getType()); AssertJUnit.assertTrue(clientEvent.getCause() instanceof ConnectException); AssertJUnit.assertTrue(clientEvent.getCause().getMessage().startsWith("Connection refused")); }