@@ -257,7 +257,7 @@ def _handle_placeholders(self, spec: dict, current: dict, path: str) -> Any:
257257 current [key ] = self ._handle_placeholders (spec , value , subpath )
258258 return current
259259
260- async def _create_entity (self , entity_spec , uri = None , init_client = False ):
260+ async def _create_entity (self , entity_spec , uri = None ):
261261 if len (entity_spec ) != 1 :
262262 self .test .fail (f"Entity spec { entity_spec } did not contain exactly one top-level key" )
263263
@@ -303,8 +303,7 @@ async def _create_entity(self, entity_spec, uri=None, init_client=False):
303303 if uri :
304304 kwargs ["h" ] = uri
305305 client = await self .test .async_rs_or_single_client (** kwargs )
306- if init_client :
307- await client .aconnect ()
306+ await client .aconnect ()
308307 self [spec ["id" ]] = client
309308 return
310309 elif entity_type == "database" :
@@ -392,9 +391,9 @@ async def drop(self: AsyncGridFSBucket, *args: Any, **kwargs: Any) -> None:
392391
393392 self .test .fail (f"Unable to create entity of unknown type { entity_type } " )
394393
395- async def create_entities_from_spec (self , entity_spec , uri = None , init_client = False ):
394+ async def create_entities_from_spec (self , entity_spec , uri = None ):
396395 for spec in entity_spec :
397- await self ._create_entity (spec , uri = uri , init_client = init_client )
396+ await self ._create_entity (spec , uri = uri )
398397
399398 def get_listener_for_client (self , client_name : str ) -> EventListenerUtil :
400399 client = self [client_name ]
@@ -1408,7 +1407,7 @@ async def run_scenario(self, spec, uri=None):
14081407 attempts = 3
14091408 for i in range (attempts ):
14101409 try :
1411- return await self ._run_scenario (spec , uri , init_client = True )
1410+ return await self ._run_scenario (spec , uri )
14121411 except (AssertionError , OperationFailure ) as exc :
14131412 if isinstance (exc , OperationFailure ) and (
14141413 _IS_SYNC or "failpoint" not in exc ._message
@@ -1428,7 +1427,7 @@ async def run_scenario(self, spec, uri=None):
14281427 await self ._run_scenario (spec , uri )
14291428 return None
14301429
1431- async def _run_scenario (self , spec , uri = None , init_client = False ):
1430+ async def _run_scenario (self , spec , uri = None ):
14321431 # maybe skip test manually
14331432 self .maybe_skip_test (spec )
14341433
@@ -1446,7 +1445,7 @@ async def _run_scenario(self, spec, uri=None, init_client=False):
14461445 self ._uri = uri
14471446 self .entity_map = EntityMapUtil (self )
14481447 await self .entity_map .create_entities_from_spec (
1449- self .TEST_SPEC .get ("createEntities" , []), uri = uri , init_client = init_client
1448+ self .TEST_SPEC .get ("createEntities" , []), uri = uri
14501449 )
14511450 self ._cluster_time = None
14521451 # process initialData
0 commit comments