File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/MongoDB.Driver.TestHelpers Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ static DriverTestConfiguration()
40
40
clientSettings . WriteConcern = WriteConcern . Acknowledged ; // ensure WriteConcern is enabled regardless of what the URL says
41
41
}
42
42
43
- clientSettings . ServerSelectionTimeout = TimeSpan . FromMilliseconds ( 500 ) ;
43
+ var serverSelectionTimeoutString = Environment . GetEnvironmentVariable ( "MONGO_SERVER_SELECTION_TIMEOUT_MS" ) ;
44
+ if ( serverSelectionTimeoutString == null )
45
+ {
46
+ serverSelectionTimeoutString = "10000" ;
47
+ }
48
+ clientSettings . ServerSelectionTimeout = TimeSpan . FromMilliseconds ( int . Parse ( serverSelectionTimeoutString ) ) ;
44
49
45
50
__client = new MongoClient ( clientSettings ) ;
46
51
__databaseNamespace = mongoUrl . DatabaseName == null ? CoreTestConfiguration . DatabaseNamespace : new DatabaseNamespace ( mongoUrl . DatabaseName ) ;
You can’t perform that action at this time.
0 commit comments