kfaraz commented on code in PR #18022:
URL: https://github.com/apache/druid/pull/18022#discussion_r2099085096
##########
indexing-service/src/test/java/org/apache/druid/indexing/overlord/TaskQueueConcurrencyTest.java:
##########
@@ -309,6 +309,97 @@ public void test_add_blocks_shutdown_forSameTaskId()
);
}
+ @Test
+ public void test_add_doesNotBlock_add_forDifferentTaskId()
+ {
+ taskQueue.setActive(true);
+
+ final Task task1 = createTask("t1");
+ final Task task2 = createTask("t2");
+
+ ActionVerifier.verifyThat(
+ update(
+ () -> taskQueue.add(task1)
+ ).withEndState(
+ () -> Assert.assertEquals(
+ Optional.of(task1),
+ taskQueue.getActiveTask(task1.getId())
+ )
+ )
+ ).doesNotBlock(
+ update(
+ () -> taskQueue.add(task2)
+ ).withEndState(
+ () -> Assert.assertEquals(
+ Optional.of(task2),
+ taskQueue.getActiveTask(task2.getId())
+ )
+ )
+ );
+ }
+
+ @Test
Review Comment:
Thanks for catching that! I have added a timeout to the other tests, best to
have a timeout here too.
--
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]