Skip to content

Add missing tests for load-balancer specification #1802

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link

Add missing tests for load-balancer specification

This PR adds test files for several areas where test coverage is missing or incomplete for the load-balancer specification:

  1. URI Validation: Tests for validating that an exception is thrown when loadBalanced=true is used with:

    • Multiple hosts in the connection string
    • replicaSet option
    • directConnection=true option
    • srvMaxHosts option with a positive integer value
  2. DNS Seedlist Discovery: Tests for verifying that:

    • When a MongoClient is configured with an SRV URI and loadBalanced=true, the driver does not poll for changes in the SRV record
  3. Server Discovery and Monitoring: Tests for verifying that:

    • The topology starts in type LoadBalanced and remains as LoadBalanced
    • The topology contains 1 ServerDescription with a ServerType of LoadBalancer
    • Required SDAM events are emitted in the correct order
  4. Driver Sessions: Tests for verifying that:

    • Sessions are always supported in load balancer mode
    • ServerType of LoadBalancer is considered a data-bearing server
  5. Log Messages: Tests for verifying that the relevant SDAM log messages are emitted

Link to Devin run: https://app.devin.ai/sessions/8a268de542e646cca085393b19ca74fe
Requested by: james.kovacs@mongodb.com

Co-Authored-By: james.kovacs@mongodb.com <jkovacs@post.harvard.edu>
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner May 12, 2025 23:00
@devin-ai-integration devin-ai-integration bot requested review from dariakp and removed request for a team May 12, 2025 23:00
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@JamesKovacs JamesKovacs removed the request for review from dariakp May 13, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants