fix: waiting more time for the log to appear (#27208)

closes: #26790

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2024-02-21 11:48:30 -05:00 committed by GitHub
parent 5f56a9b356
commit daa6cf5951
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,11 +89,8 @@ public class WatchedSecretsTest extends BaseOperatorTest {
k8sclient.resource(dbSecret).update(); k8sclient.resource(dbSecret).update();
// dynamically check pod 0 to avoid race conditions // dynamically check pod 0 to avoid race conditions
Awaitility.await().atMost(1, TimeUnit.MINUTES).ignoreExceptions() Awaitility.await().atMost(2, TimeUnit.MINUTES).ignoreExceptions().until(() ->
.until(() -> k8sclient k8sclient.pods().withName(kc.getMetadata().getName() + "-0").getLog().contains("password authentication failed for user \"" + username + "\""));
.raw(String.format("/api/v1/namespaces/%s/pods/%s/log?previous=true", namespace,
kc.getMetadata().getName() + "-0"))
.contains("password authentication failed for user \"" + username + "\""));
} }
private StatefulSet getStatefulSet(Keycloak kc) { private StatefulSet getStatefulSet(Keycloak kc) {