Skip to content

Conversation

@HofmeisterAn
Copy link
Collaborator

What does this PR do?

This PR adds another wait strategy to the Keycloak module. In addition to waiting for the health API, the module now also waits until one of these log messages appears:

Added user '[^']+' to realm '[^']+'|Created temporary admin user with username \S+.

I ran the tests for a while in a GH Codespaces environment (which behaves more like our CI) and didn't run into any issues.

Why is it important?

Our CI occasionally fails with stack traces that indicates Keycloak isn't fully ready to handle requests. It seems that the user setup wasn't complete, causing authentication against the instance to fail.

Related issues

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Sep 23, 2025
@netlify
Copy link

netlify bot commented Sep 23, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 9dc36ab
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/68d2c6d3963f3f000881af3f
😎 Deploy Preview https://deploy-preview-1535--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@HofmeisterAn HofmeisterAn merged commit 874a006 into develop Sep 23, 2025
137 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/keycloak-add-logging-wait-stragety branch September 23, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Keycloak tests occasionally fail (FlurlHttpException : Call failed with status code 401 (Unauthorized))

2 participants