Browse Source

Time is too small and the task is not finished

pull/3/MERGE
CalvinKirs 4 years ago
parent
commit
a164d5f990
  1. 10
      dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java

10
dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java

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

Loading…
Cancel
Save