This is an automated email from the ASF dual-hosted git repository.
kfaraz 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 f7f74f455e5 Fix flaky KillSupervisorsCustomDutyTest. (#19150)
f7f74f455e5 is described below
commit f7f74f455e5db4c71b6b5a94c743a72bb27c3a4f
Author: Gian Merlino <[email protected]>
AuthorDate: Fri Mar 13 03:46:54 2026 -0700
Fix flaky KillSupervisorsCustomDutyTest. (#19150)
It is possible for the KillSupervisorsCustomDutyTest to flake
because the final getSupervisorHistory call fails to return 404.
It is possible that this happens because the two entries are
cleaned up in different duty runs, perhaps because the tombstone
was too new to clean up on the first run. To guard against this,
wait for the metadata/kill/supervisor/count metric to sum to two.
---
.../testing/embedded/server/KillSupervisorsCustomDutyTest.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/server/KillSupervisorsCustomDutyTest.java
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/server/KillSupervisorsCustomDutyTest.java
index f29d4b305b5..156f7ece608 100644
---
a/embedded-tests/src/test/java/org/apache/druid/testing/embedded/server/KillSupervisorsCustomDutyTest.java
+++
b/embedded-tests/src/test/java/org/apache/druid/testing/embedded/server/KillSupervisorsCustomDutyTest.java
@@ -35,7 +35,6 @@ import org.apache.druid.testing.embedded.EmbeddedDruidCluster;
import org.apache.druid.testing.embedded.EmbeddedOverlord;
import org.apache.druid.testing.embedded.junit5.EmbeddedClusterTestBase;
import org.hamcrest.MatcherAssert;
-import org.hamcrest.Matchers;
import org.jboss.netty.handler.codec.http.HttpMethod;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -90,10 +89,10 @@ public class KillSupervisorsCustomDutyTest extends
EmbeddedClusterTestBase
Assertions.assertEquals(2, historyAfterTermination.size());
Assertions.assertInstanceOf(NoopSupervisorSpec.class,
historyAfterTermination.get(0).getSpec());
- // Wait until the cleanup metric has been emitted
- coordinator.latchableEmitter().waitForEvent(
- event -> event.hasMetricName("metadata/kill/supervisor/count")
- .hasValueMatching(Matchers.greaterThanOrEqualTo(1L))
+ // Wait until both entries have been cleaned up.
+ coordinator.latchableEmitter().waitForEventAggregate(
+ event -> event.hasMetricName("metadata/kill/supervisor/count"),
+ aggregate -> aggregate.hasSumAtLeast(2)
);
// Verify that the history now returns 404 Not Found
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]