@@ -121,7 +121,6 @@ def __init__(self):
121121 self .sessions_enabled = False
122122 self .client = None # type: ignore
123123 self .conn_lock = threading .Lock ()
124- self .is_data_lake = False
125124 self .load_balancer = TEST_LOADBALANCER
126125 self ._fips_enabled = None
127126 if self .load_balancer :
@@ -199,16 +198,6 @@ def _init_client(self):
199198 self .mongoses = []
200199 self .connection_attempts = []
201200 self .client = self ._connect (host , port )
202- if self .client is not None :
203- # Return early when connected to dataLake as mongohoused does not
204- # support the getCmdLineOpts command and is tested without TLS.
205- if os .environ .get ("TEST_DATA_LAKE" ):
206- self .is_data_lake = True
207- self .auth_enabled = True
208- self .client .close ()
209- self .client = self ._connect (host , port , username = db_user , password = db_pwd )
210- self .connected = True
211- return
212201
213202 if HAVE_SSL and not self .client :
214203 # Is MongoDB configured for SSL?
@@ -501,14 +490,6 @@ def require_connection(self, func):
501490 func = func ,
502491 )
503492
504- def require_data_lake (self , func ):
505- """Run a test only if we are connected to Atlas Data Lake."""
506- return self ._require (
507- lambda : self .is_data_lake ,
508- "Not connected to Atlas Data Lake on self.pair" ,
509- func = func ,
510- )
511-
512493 def require_version_min (self , * ver ):
513494 """Run a test only if the server version is at least ``version``."""
514495 other_version = Version (* ver )
@@ -1230,21 +1211,6 @@ def teardown():
12301211 garbage .append (f" gc.get_referrers: { gc .get_referrers (g )!r} " )
12311212 if garbage :
12321213 raise AssertionError ("\n " .join (garbage ))
1233- c = client_context .client
1234- if c :
1235- if not client_context .is_data_lake :
1236- try :
1237- c .drop_database ("pymongo-pooling-tests" )
1238- c .drop_database ("pymongo_test" )
1239- c .drop_database ("pymongo_test1" )
1240- c .drop_database ("pymongo_test2" )
1241- c .drop_database ("pymongo_test_mike" )
1242- c .drop_database ("pymongo_test_bernie" )
1243- except AutoReconnect :
1244- # PYTHON-4982
1245- if sys .implementation .name .lower () != "pypy" :
1246- raise
1247- c .close ()
12481214 print_running_clients ()
12491215
12501216
0 commit comments