Skip to content

Conversation

@HofmeisterAn
Copy link
Collaborator

What does this PR do?

The previous wait strategy indicated readiness too early when using a single-node replica set configuration.

This PR updates the wait strategy to match the approach used in other Testcontainers language implementations. Instead of relying on db.runCommand({isMaster: 1}).ismaster, it uses db.runCommand({hello: 1}).isWritablePrimary though. According to the docs, this is the recommended method, since {isMaster: 1} is deprecated and has been replaced by {hello: 1}.

@Yorie could you please test the changes in the PR? It would really help!

Why is it important?

-

Related issues

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

netlify bot commented Oct 10, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit 3284470
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/68e9fc089c07b700088d1bb1
😎 Deploy Preview https://deploy-preview-1548--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
Copy link
Collaborator Author

Looks like Papercut just released a new version of their image, and it isn't compatible with the current configuration anymore. I'll check it in another PR. Luckily, they use tags now that allows us to pin the version.

@Yorie
Copy link

Yorie commented Oct 10, 2025

Tag me when changes will be ready to be tested, I'll do when I can :)

@HofmeisterAn HofmeisterAn merged commit 8f9f510 into develop Oct 11, 2025
139 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/wait-for-replica-set branch October 11, 2025 07:05
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]: Could not connect to a Mongo DB replica set with new Mongo DB driver 3.0.x

3 participants