File tree 1 file changed +25
-4
lines changed 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -245,10 +245,6 @@ exports['Should correctly pass through extra sharded options'] = {
245
245
}
246
246
}
247
247
} , function ( err , db ) {
248
- console . log ( "============================================" )
249
- console . dir ( err )
250
- console . dir ( db . s . topology . s . clonedOptions )
251
-
252
248
test . equal ( false , db . s . topology . s . clonedOptions . ha ) ;
253
249
test . equal ( 10000 , db . s . topology . s . clonedOptions . haInterval ) ;
254
250
test . equal ( 100 , db . s . topology . s . clonedOptions . localThresholdMS ) ;
@@ -631,3 +627,28 @@ exports['Should correctly pass through socketTimeoutMS and connectTimeoutMS'] =
631
627
} ) ;
632
628
}
633
629
}
630
+
631
+ exports [ 'Should correctly pass through socketTimeoutMS and connectTimeoutMS from uri' ] = {
632
+ metadata : {
633
+ requires : {
634
+ node : ">0.8.0" ,
635
+ topology : [ 'single' ]
636
+ }
637
+ } ,
638
+
639
+ // The actual test we wish to run
640
+ test : function ( configuration , test ) {
641
+ var MongoClient = configuration . require . MongoClient ;
642
+ var uri = f ( "%s?socketTimeoutMS=120000&connectTimeoutMS=15000" , configuration . url ( ) ) ;
643
+
644
+ MongoClient . connect ( uri , {
645
+ } , function ( err , db ) {
646
+ test . equal ( null , err ) ;
647
+ test . equal ( 120000 , db . serverConfig . s . server . s . options . socketTimeout ) ;
648
+ test . equal ( 15000 , db . serverConfig . s . server . s . options . connectionTimeout ) ;
649
+
650
+ db . close ( ) ;
651
+ test . done ( ) ;
652
+ } ) ;
653
+ }
654
+ }
You can’t perform that action at this time.
0 commit comments