From c5652336efe04a770fb316e7b48d5b5509c4f3f0 Mon Sep 17 00:00:00 2001 From: Shane Harvey Date: Fri, 14 Apr 2023 14:45:57 -0700 Subject: [PATCH] PYTHON-3671 Use default server selection timeout in test setup (#1191) --- test/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/__init__.py b/test/__init__.py index 20b1d00ca..dc324c691 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -536,7 +536,6 @@ class ClientContext(object): port, username=db_user, password=db_pwd, - serverSelectionTimeoutMS=100, **self.default_client_options, ) @@ -550,6 +549,8 @@ class ClientContext(object): return False else: raise + finally: + client.close() def _server_started_with_auth(self): # MongoDB >= 2.0