From a212c79207a1b4bcfc4d7752a12477b46683e191 Mon Sep 17 00:00:00 2001 From: Jeffrey 'Alex' Clark Date: Wed, 20 May 2026 16:35:16 -0400 Subject: [PATCH] PYTHON-4741 Stop using rsSyncApplyStop in tests --- test/asynchronous/test_bulk.py | 10 +++++----- test/test_bulk.py | 8 +++----- tools/synchro.py | 2 -- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/test/asynchronous/test_bulk.py b/test/asynchronous/test_bulk.py index 02958e6f0e..ce505bcb37 100644 --- a/test/asynchronous/test_bulk.py +++ b/test/asynchronous/test_bulk.py @@ -947,17 +947,18 @@ async def cause_wtimeout(self, requests, ordered): if not async_client_context.test_commands_enabled: self.skipTest("Test commands must be enabled.") - # Use the rsSyncApplyStop failpoint to pause replication on a + # Use the stopReplProducer failpoint to pause replication on a # secondary which will cause a wtimeout error. - await self.secondary.admin.command("configureFailPoint", "rsSyncApplyStop", mode="alwaysOn") + await self.secondary.admin.command( + "configureFailPoint", "stopReplProducer", mode="alwaysOn" + ) try: coll = self.coll.with_options(write_concern=WriteConcern(w=self.w, wtimeout=1)) return await coll.bulk_write(requests, ordered=ordered) finally: - await self.secondary.admin.command("configureFailPoint", "rsSyncApplyStop", mode="off") + await self.secondary.admin.command("configureFailPoint", "stopReplProducer", mode="off") - @async_client_context.require_version_max(7, 1) # PYTHON-4560 @async_client_context.require_replica_set @async_client_context.require_secondaries_count(1) async def test_write_concern_failure_ordered(self): @@ -1039,7 +1040,6 @@ async def test_write_concern_failure_ordered(self): failed = details["writeErrors"][0] self.assertIn("duplicate", failed["errmsg"]) - @async_client_context.require_version_max(7, 1) # PYTHON-4560 @async_client_context.require_replica_set @async_client_context.require_secondaries_count(1) async def test_write_concern_failure_unordered(self): diff --git a/test/test_bulk.py b/test/test_bulk.py index 1de406fca5..712c6c6a26 100644 --- a/test/test_bulk.py +++ b/test/test_bulk.py @@ -945,17 +945,16 @@ def cause_wtimeout(self, requests, ordered): if not client_context.test_commands_enabled: self.skipTest("Test commands must be enabled.") - # Use the rsSyncApplyStop failpoint to pause replication on a + # Use the stopReplProducer failpoint to pause replication on a # secondary which will cause a wtimeout error. - self.secondary.admin.command("configureFailPoint", "rsSyncApplyStop", mode="alwaysOn") + self.secondary.admin.command("configureFailPoint", "stopReplProducer", mode="alwaysOn") try: coll = self.coll.with_options(write_concern=WriteConcern(w=self.w, wtimeout=1)) return coll.bulk_write(requests, ordered=ordered) finally: - self.secondary.admin.command("configureFailPoint", "rsSyncApplyStop", mode="off") + self.secondary.admin.command("configureFailPoint", "stopReplProducer", mode="off") - @client_context.require_version_max(7, 1) # PYTHON-4560 @client_context.require_replica_set @client_context.require_secondaries_count(1) def test_write_concern_failure_ordered(self): @@ -1037,7 +1036,6 @@ def test_write_concern_failure_ordered(self): failed = details["writeErrors"][0] self.assertIn("duplicate", failed["errmsg"]) - @client_context.require_version_max(7, 1) # PYTHON-4560 @client_context.require_replica_set @client_context.require_secondaries_count(1) def test_write_concern_failure_unordered(self): diff --git a/tools/synchro.py b/tools/synchro.py index ed794c5963..39250ab14a 100644 --- a/tools/synchro.py +++ b/tools/synchro.py @@ -384,8 +384,6 @@ def translate_docstrings(lines: list[str]) -> list[str]: lines[i] = lines[i].replace(k, replacements[k]) if "Sync" in lines[i] and "Synchronous" not in lines[i] and replacements[k] in lines[i]: lines[i] = lines[i].replace("Sync", "") - if "rsApplyStop" in lines[i]: - lines[i] = lines[i].replace("rsApplyStop", "rsSyncApplyStop") if "async for" in lines[i] or "async with" in lines[i] or "async def" in lines[i]: lines[i] = lines[i].replace("async ", "") if "await " in lines[i] and "tailable" not in lines[i]: