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