This is an automated email from the ASF dual-hosted git repository.
FrankChen021 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new e5a09317c41 test: wait for handoff notice completion in supervisor
state test (#20453)
e5a09317c41 is described below
commit e5a09317c416fee18a25a1ad5aabbd7019b032e8
Author: Edmond Abraham <[email protected]>
AuthorDate: Wed Sep 30 03:16:54 2026 -0400
test: wait for handoff notice completion in supervisor state test (#20453)
---
.../SeekableStreamSupervisorStateTest.java | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git
a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java
b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java
index 7aace3d7540..d7634a842db 100644
---
a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java
+++
b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorStateTest.java
@@ -1668,7 +1668,18 @@ public class SeekableStreamSupervisorStateTest extends
EasyMockSupport
replayAll();
- SeekableStreamSupervisor supervisor = new TestSeekableStreamSupervisor();
+ final CountDownLatch handoffNoticeHandled = new CountDownLatch(1);
+ SeekableStreamSupervisor supervisor = new TestSeekableStreamSupervisor()
+ {
+ @Override
+ protected void emitNoticeProcessTime(String noticeType, long
timeInMillis)
+ {
+ super.emitNoticeProcessTime(noticeType, timeInMillis);
+ if ("handoff_task_group_notice".equals(noticeType)) {
+ handoffNoticeHandled.countDown();
+ }
+ }
+ };
supervisor.start();
supervisor.runInternal();
@@ -1677,9 +1688,10 @@ public class SeekableStreamSupervisorStateTest extends
EasyMockSupport
Assertions.assertNull(id1.getCurrentRunnerStatus());
Assertions.assertEquals("NOT_STARTED", id1.getCurrentRunnerStatus());
- while (supervisor.getNoticesQueueSize() > 0) {
- Thread.sleep(100);
- }
+ Assertions.assertTrue(
+ handoffNoticeHandled.await(5, TimeUnit.SECONDS),
+ "Handoff task group notice was not handled"
+ );
supervisor.runInternal();
verifyAll();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]