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 39fd7d48fcb Fix flaky test
CoordinatorPollingBasicAuthenticatorCacheManagerTest (#18130)
39fd7d48fcb is described below
commit 39fd7d48fcb20554c25eeaf53f7417823efba5b5
Author: Kashif Faraz <[email protected]>
AuthorDate: Thu Jun 12 14:35:28 2025 +0530
Fix flaky test CoordinatorPollingBasicAuthenticatorCacheManagerTest (#18130)
Changes:
- Add a short delay after `manager.stop()` to give the threads some time to
be interrupted
---
.../cache/CoordinatorPollingBasicAuthenticatorCacheManagerTest.java | 2 ++
.../db/cache/CoordinatorPollingBasicAuthorizerCacheManagerTest.java | 4 ++++
2 files changed, 6 insertions(+)
diff --git
a/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authentication/db/cache/CoordinatorPollingBasicAuthenticatorCacheManagerTest.java
b/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authentication/db/cache/CoordinatorPollingBasicAuthenticatorCacheManagerTest.java
index b122c0b5a6e..f06d2deeb04 100644
---
a/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authentication/db/cache/CoordinatorPollingBasicAuthenticatorCacheManagerTest.java
+++
b/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authentication/db/cache/CoordinatorPollingBasicAuthenticatorCacheManagerTest.java
@@ -102,6 +102,8 @@ public class
CoordinatorPollingBasicAuthenticatorCacheManagerTest
// Stop the manager and verify that the polling thread has been interrupted
manager.stop();
+ Thread.sleep(10);
+
Assert.assertTrue(isInterrupted.get());
EasyMock.verify(injector, leaderClient);
diff --git
a/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authorization/db/cache/CoordinatorPollingBasicAuthorizerCacheManagerTest.java
b/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authorization/db/cache/CoordinatorPollingBasicAuthorizerCacheManagerTest.java
index d02de5e7f70..602f90e4461 100644
---
a/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authorization/db/cache/CoordinatorPollingBasicAuthorizerCacheManagerTest.java
+++
b/extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/basic/authorization/db/cache/CoordinatorPollingBasicAuthorizerCacheManagerTest.java
@@ -131,6 +131,8 @@ public class
CoordinatorPollingBasicAuthorizerCacheManagerTest
// Stop the manager and verify that the polling thread has been interrupted
manager.stop();
+ Thread.sleep(10);
+
Assert.assertTrue(isInterrupted.get());
verifyAll();
@@ -174,6 +176,8 @@ public class
CoordinatorPollingBasicAuthorizerCacheManagerTest
// Stop the manager and verify that the polling thread has been interrupted
manager.stop();
+ Thread.sleep(10);
+
Assert.assertTrue(isInterrupted.get());
verifyAll();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]