[CSHARP-2263] Testing framework should auto-detect if being run against a replica set Created: 04/May/18  Updated: 28/Oct/23  Resolved: 10/May/18

Status: Closed
Project: C# Driver
Component/s: Testing
Affects Version/s: None
Fix Version/s: 2.7.0

Type: Improvement Priority: Minor - P4
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The testing framework uses a default connection string of

mongodb://localhost 

Which does not work when run against a replica set, at least not when 27017 is not the primary.

If no connection string is provided to the testing framework (via an environment variable), the testing framework should probe the server at 27017 and use the following connection string instead if the server at 27017 is a member of a replica set:

mongodb://localhost/?connect=replicaSet 

 

 

 



 Comments   
Comment by Githook User [ 10/May/18 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-2263: Testing framework should auto-detect if being run against a replica set.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/4aef32262eccdbc39b17283723d16a2b3403d0c2

Generated at Wed Feb 07 21:42:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.