Shekharrajak commented on code in PR #19311:
URL: https://github.com/apache/druid/pull/19311#discussion_r3298287473


##########
extensions-core/kafka-indexing-service/src/test/java/org/apache/druid/indexing/kafka/ShareGroupIndexTaskRunnerTest.java:
##########
@@ -271,6 +272,61 @@ public void 
testRunLoop_segmentAllocationFails_throwsAndExits() throws Exception
     }
   }
 
+  @Test
+  public void testRunLoop_concurrentTasks_useDifferentSequenceNames() throws 
Exception
+  {
+    final ShareGroupIndexTask taskA = buildTask("share_group_task_A");
+    final ShareGroupIndexTask taskB = buildTask("share_group_task_B");
+    final java.util.Set<String> seqNamesUsedByA = 
runOnceAndCaptureSequenceNames(taskA);
+    final java.util.Set<String> seqNamesUsedByB = 
runOnceAndCaptureSequenceNames(taskB);
+    Assert.assertFalse("Task A should call driver.add at least once", 
seqNamesUsedByA.isEmpty());
+    Assert.assertFalse("Task B should call driver.add at least once", 
seqNamesUsedByB.isEmpty());
+    final java.util.Set<String> shared = new 
java.util.HashSet<>(seqNamesUsedByA);
+    shared.retainAll(seqNamesUsedByB);
+    Assert.assertTrue(
+        "Concurrent share-group tasks must not share segment sequence names; 
shared=" + shared,

Review Comment:
   validating that seq name is different for both task.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to