Skip to content

Commit d00eb45

Browse files
committed
test_ignore_stale_connection_errors should only run on python3.11 and newer for async
1 parent 1c1ebef commit d00eb45

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test/asynchronous/test_discovery_and_monitoring.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ async def send_cluster_time(time, inc, should_update):
277277

278278
class TestIgnoreStaleErrors(AsyncIntegrationTest):
279279
async def test_ignore_stale_connection_errors(self):
280+
if not _IS_SYNC and sys.version_info < (3, 11):
281+
self.skipTest("Test requires asyncio.Barrier (added in Python 3.11)")
280282
N_TASKS = 5
281283
barrier = async_create_barrier(N_TASKS, timeout=30)
282284
client = await self.async_rs_or_single_client(minPoolSize=N_TASKS)

test/test_discovery_and_monitoring.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ def send_cluster_time(time, inc, should_update):
277277

278278
class TestIgnoreStaleErrors(IntegrationTest):
279279
def test_ignore_stale_connection_errors(self):
280+
if not _IS_SYNC and sys.version_info < (3, 11):
281+
self.skipTest("Test requires asyncio.Barrier (added in Python 3.11)")
280282
N_TASKS = 5
281283
barrier = create_barrier(N_TASKS, timeout=30)
282284
client = self.rs_or_single_client(minPoolSize=N_TASKS)

0 commit comments

Comments
 (0)