|
|
@ -84,15 +84,15 @@ public class TaskResponseServiceTest { |
|
|
|
Mockito.when(channel.writeAndFlush(Mockito.any())).thenReturn(null); |
|
|
|
Mockito.when(channel.writeAndFlush(Mockito.any())).thenReturn(null); |
|
|
|
taskResponseService.addResponse(ackEvent); |
|
|
|
taskResponseService.addResponse(ackEvent); |
|
|
|
taskResponseService.addResponse(resultEvent); |
|
|
|
taskResponseService.addResponse(resultEvent); |
|
|
|
try { |
|
|
|
|
|
|
|
Thread.sleep(10000); |
|
|
|
|
|
|
|
} catch (InterruptedException ignored) { |
|
|
|
|
|
|
|
Thread.currentThread().interrupt(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@After |
|
|
|
@After |
|
|
|
public void after() { |
|
|
|
public void after() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
Thread.sleep(20000); |
|
|
|
|
|
|
|
} catch (InterruptedException ignored) { |
|
|
|
|
|
|
|
Thread.currentThread().interrupt(); |
|
|
|
|
|
|
|
} |
|
|
|
Assert.assertEquals(0, taskResponseService.getEventQueue().size()); |
|
|
|
Assert.assertEquals(0, taskResponseService.getEventQueue().size()); |
|
|
|
taskResponseService.stop(); |
|
|
|
taskResponseService.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|