From f0c552b2f91fcce0c3daccb0e8cb878c9182c46a Mon Sep 17 00:00:00 2001 From: Kashif Faraz Date: Sun, 14 Jan 2024 22:29:15 +0530 Subject: [PATCH] Fix basic auth integration test (#15679) * Add some retries * Add a delay to allow creds to propagate * Checkstyle and stuff --- .../security/ITBasicAuthConfigurationTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java b/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java index 17123c02352..04eb9da1f76 100644 --- a/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java +++ b/integration-tests/src/test/java/org/apache/druid/tests/security/ITBasicAuthConfigurationTest.java @@ -77,6 +77,20 @@ public class ITBasicAuthConfigurationTest extends AbstractAuthConfigurationTest checkNodeAccess(druid99); } + @Override + protected void setupHttpClientsAndUsers() throws Exception + { + super.setupHttpClientsAndUsers(); + + // Add a delay to allow propagation of credentials to all services + try { + Thread.sleep(5000); + } + catch (Throwable t) { + // Ignore exception + } + } + @Override protected void setupDatasourceOnlyUser() throws Exception {