jihoonson commented on a change in pull request #6207: Fix timeout in 
KafkaSupervisorTest.testCheckpointForInactiveTaskGroup
URL: https://github.com/apache/incubator-druid/pull/6207#discussion_r215058524
 
 

 ##########
 File path: 
extensions-core/kafka-indexing-service/src/test/java/io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java
 ##########
 @@ -2115,12 +2115,8 @@ public void testCheckpointForInactiveTaskGroup()
 
     verifyAll();
 
-    while (serviceEmitter.getStackTrace() != null) {
-      Thread.sleep(100);
-    }
-
-    Assert.assertNull(serviceEmitter.getStackTrace());
-    Assert.assertNull(serviceEmitter.getExceptionMessage());
+    Assert.assertNull(serviceEmitter.getStackTrace(), 
serviceEmitter.getStackTrace());
 
 Review comment:
   @leventov thanks. I've also noticed that before. The problem is that the 
supervisor periodically executes `runNotice` and this can potentially call 
every method of the supervisor which in turn requires to mock everything using 
`EasyMock`. 
   
   I think it's better to refactor the whole KafkaSupervisorTest to be based on 
a sort of more controllable mockup environment by creating `taskRunner`, 
`taskMaster`, `taskStorage`, and `taskClient` for test purpose instead of 
making them using EasyMock.
   
   Raised https://github.com/apache/incubator-druid/issues/6296.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to