Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add HTTP wait strategy to prevent race-condition in WaitUntilHttpRequestIsSucceededTest #1299

Merged

Conversation

HofmeisterAn
Copy link
Collaborator

What does this PR do?

This PR fixes a race-condition in tests that depend on HTTP responses. Previously, we used nc to listen for HTTP requests and send responses. However, nc cannot handle multiple incoming connections, and there is a small window where no listener is available. This could end up in flaky behavior.

The changes leverage socat to send HTTP responses, which works reliably for multiple incoming requests.

Why is it important?

-

Related issues

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Nov 16, 2024
Copy link

netlify bot commented Nov 16, 2024

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit ce0689f
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/6738c6b0e3a7b10008a644d4
😎 Deploy Preview https://deploy-preview-1299--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 site configuration.

@HofmeisterAn HofmeisterAn merged commit 5cf055d into develop Nov 16, 2024
103 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/fix-race-condition-test-file-exists-in-container branch November 16, 2024 16:42
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.

1 participant