File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,24 @@ def test_does_not_flipflop(self):
289
289
new = set (client .topology_description .server_descriptions ())
290
290
self .assertSetEqual (old , new )
291
291
292
+ def test_srv_service_name (self ):
293
+ # Construct a valid final response callback distinct from base.
294
+ response = [
295
+ ("localhost.test.build.10gen.cc." , 27019 ),
296
+ ("localhost.test.build.10gen.cc." , 27020 )
297
+ ]
298
+
299
+ def nodelist_callback ():
300
+ return response
301
+
302
+ with SrvPollingKnobs (
303
+ ttl_time = WAIT_TIME , min_srv_rescan_interval = WAIT_TIME ):
304
+ client = MongoClient (
305
+ "mongodb+srv://test22.test.build.10gen.cc/?srvServiceName"
306
+ "=customname" )
307
+ with SrvPollingKnobs (nodelist_callback = nodelist_callback ):
308
+ self .assert_nodelist_change (response , client )
309
+
292
310
293
311
if __name__ == '__main__' :
294
312
unittest .main ()
You can’t perform that action at this time.
0 commit comments