Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2263

Testing framework should auto-detect if being run against a replica set

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.0
    • Affects Version/s: None
    • Component/s: Testing
    • None

      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 

       

       

       

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: