This is an automated email from the ASF dual-hosted git repository.

gian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new a7ca458  Fix race in testCheckpointForUnknownTaskGroup() of 
KafkaSupervisorTest (#6153)
a7ca458 is described below

commit a7ca4589ddd66acc95c2b148640ed4f95d962ed9
Author: Jihoon Son <jihoon...@apache.org>
AuthorDate: Sat Aug 11 08:26:46 2018 -0700

    Fix race in testCheckpointForUnknownTaskGroup() of KafkaSupervisorTest 
(#6153)
---
 .../io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java   | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/extensions-core/kafka-indexing-service/src/test/java/io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java
 
b/extensions-core/kafka-indexing-service/src/test/java/io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java
index b49af37..36f3d73 100644
--- 
a/extensions-core/kafka-indexing-service/src/test/java/io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java
+++ 
b/extensions-core/kafka-indexing-service/src/test/java/io/druid/indexing/kafka/supervisor/KafkaSupervisorTest.java
@@ -70,8 +70,8 @@ import io.druid.segment.indexing.RealtimeIOConfig;
 import io.druid.segment.indexing.granularity.UniformGranularitySpec;
 import io.druid.segment.realtime.FireDepartment;
 import io.druid.server.metrics.DruidMonitorSchedulerConfig;
-import io.druid.server.metrics.NoopServiceEmitter;
 import io.druid.server.metrics.ExceptionCapturingServiceEmitter;
+import io.druid.server.metrics.NoopServiceEmitter;
 import org.apache.curator.test.TestingCluster;
 import org.apache.kafka.clients.producer.KafkaProducer;
 import org.apache.kafka.clients.producer.ProducerRecord;
@@ -2183,7 +2183,11 @@ public class KafkaSupervisorTest extends EasyMockSupport
 
     verifyAll();
 
-    Assert.assertNotNull(serviceEmitter.getStackTrace());
+    while (serviceEmitter.getStackTrace() == null) {
+      Thread.sleep(100);
+    }
+
+    
Assert.assertTrue(serviceEmitter.getStackTrace().startsWith("io.druid.java.util.common.ISE:
 WTH?! cannot find"));
     Assert.assertEquals(
         "WTH?! cannot find taskGroup [0] among all taskGroups [{}]",
         serviceEmitter.getExceptionMessage()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to