File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
MongoDB.Driver.TestHelpers
MongoDB.Driver.Tests/Specifications/Runner Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 16
16
using System ;
17
17
using System . Collections . Generic ;
18
18
using System . Linq ;
19
- using System . Net ;
20
- using System . Net . Sockets ;
21
- using MongoDB . Bson ;
22
19
using MongoDB . Driver . Core ;
20
+ using MongoDB . Driver . Core . Clusters ;
23
21
using MongoDB . Driver . Core . Configuration ;
24
22
using MongoDB . Driver . TestHelpers ;
25
23
@@ -113,9 +111,15 @@ public static DisposableMongoClient CreateDisposableClient(Action<ClusterBuilder
113
111
}
114
112
115
113
public static DisposableMongoClient CreateDisposableClient (
116
- Action < MongoClientSettings > clientSettingsConfigurator ,
114
+ Action < MongoClientSettings > clientSettingsConfigurator ,
117
115
bool useMultipleShardRouters = false )
118
116
{
117
+ if ( CoreTestConfiguration . Cluster . Description . Type != ClusterType . Sharded )
118
+ {
119
+ // This option has no effect for non-sharded topologies.
120
+ useMultipleShardRouters = false ;
121
+ }
122
+
119
123
var connectionString = useMultipleShardRouters
120
124
? CoreTestConfiguration . ConnectionStringWithMultipleShardRouters . ToString ( )
121
125
: CoreTestConfiguration . ConnectionString . ToString ( ) ;
Original file line number Diff line number Diff line change @@ -337,7 +337,6 @@ protected FailPoint ConfigureFailPoint(BsonDocument test)
337
337
protected DisposableMongoClient CreateDisposableClient ( BsonDocument test , EventCapturer eventCapturer )
338
338
{
339
339
var useMultipleShardRouters = test . GetValue ( "useMultipleMongoses" , false ) . AsBoolean ;
340
- useMultipleShardRouters = false ; // TODO: remove this line once SERVER-41532 is fixed
341
340
342
341
return DriverTestConfiguration . CreateDisposableClient (
343
342
settings =>
You can’t perform that action at this time.
0 commit comments