File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/MongoDB.Driver.Core.TestHelpers Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -75,9 +75,15 @@ public static SemanticVersion ServerVersion
75
75
// static methods
76
76
public static ClusterBuilder ConfigureCluster ( )
77
77
{
78
+ var serverSelectionTimeoutString = Environment . GetEnvironmentVariable ( "MONGO_SERVER_SELECTION_TIMEOUT_MS" ) ;
79
+ if ( serverSelectionTimeoutString == null )
80
+ {
81
+ serverSelectionTimeoutString = "10000" ;
82
+ }
83
+
78
84
var builder = new ClusterBuilder ( )
79
85
. ConfigureWithConnectionString ( __connectionString )
80
- . ConfigureCluster ( c => c . With ( serverSelectionTimeout : TimeSpan . FromMilliseconds ( 500 ) ) ) ;
86
+ . ConfigureCluster ( c => c . With ( serverSelectionTimeout : TimeSpan . FromMilliseconds ( int . Parse ( serverSelectionTimeoutString ) ) ) ) ;
81
87
82
88
if ( __connectionString . Ssl . HasValue && __connectionString . Ssl . Value )
83
89
{
You can’t perform that action at this time.
0 commit comments