PYTHON-4996 - Ensure all async integration tests call their parent asyncSetup method (#2023)
This commit is contained in:
parent
a9e61f6bed
commit
f45b35a478
@ -102,6 +102,7 @@ class TestClientBulkWrite(AsyncIntegrationTest):
|
||||
# https://github.com/mongodb/specifications/tree/master/source/crud/tests
|
||||
class TestClientBulkWriteCRUD(AsyncIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
await super().asyncSetUp()
|
||||
self.max_write_batch_size = await async_client_context.max_write_batch_size
|
||||
self.max_bson_object_size = await async_client_context.max_bson_size
|
||||
self.max_message_size_bytes = await async_client_context.max_message_size_bytes
|
||||
@ -652,6 +653,7 @@ class TestClientBulkWriteCSOT(AsyncIntegrationTest):
|
||||
async def asyncSetUp(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
await super().asyncSetUp()
|
||||
self.max_write_batch_size = await async_client_context.max_write_batch_size
|
||||
self.max_bson_object_size = await async_client_context.max_bson_size
|
||||
self.max_message_size_bytes = await async_client_context.max_message_size_bytes
|
||||
|
||||
@ -46,6 +46,7 @@ class TestAsyncConnectionsSurvivePrimaryStepDown(AsyncIntegrationTest):
|
||||
|
||||
@async_client_context.require_replica_set
|
||||
async def asyncSetUp(self):
|
||||
await super().asyncSetUp()
|
||||
self.listener = CMAPListener()
|
||||
self.client = await self.async_rs_or_single_client(
|
||||
event_listeners=[self.listener], retryWrites=False, heartbeatFrequencyMS=500
|
||||
|
||||
@ -102,6 +102,7 @@ class TestClientBulkWrite(IntegrationTest):
|
||||
# https://github.com/mongodb/specifications/tree/master/source/crud/tests
|
||||
class TestClientBulkWriteCRUD(IntegrationTest):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.max_write_batch_size = client_context.max_write_batch_size
|
||||
self.max_bson_object_size = client_context.max_bson_size
|
||||
self.max_message_size_bytes = client_context.max_message_size_bytes
|
||||
@ -648,6 +649,7 @@ class TestClientBulkWriteCSOT(IntegrationTest):
|
||||
def setUp(self):
|
||||
if os.environ.get("SKIP_CSOT_TESTS", ""):
|
||||
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
|
||||
super().setUp()
|
||||
self.max_write_batch_size = client_context.max_write_batch_size
|
||||
self.max_bson_object_size = client_context.max_bson_size
|
||||
self.max_message_size_bytes = client_context.max_message_size_bytes
|
||||
|
||||
@ -46,6 +46,7 @@ class TestConnectionsSurvivePrimaryStepDown(IntegrationTest):
|
||||
|
||||
@client_context.require_replica_set
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.listener = CMAPListener()
|
||||
self.client = self.rs_or_single_client(
|
||||
event_listeners=[self.listener], retryWrites=False, heartbeatFrequencyMS=500
|
||||
|
||||
@ -511,6 +511,7 @@ class TestGridfsReplicaSet(IntegrationTest):
|
||||
super().setUp()
|
||||
|
||||
@classmethod
|
||||
@client_context.require_connection
|
||||
def tearDownClass(cls):
|
||||
client_context.client.drop_database("gfsreplica")
|
||||
|
||||
|
||||
@ -481,6 +481,7 @@ class TestGridfsBucketReplicaSet(IntegrationTest):
|
||||
super().setUp()
|
||||
|
||||
@classmethod
|
||||
@client_context.require_connection
|
||||
def tearDownClass(cls):
|
||||
client_context.client.drop_database("gfsbucketreplica")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user