Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/asynchronous/test_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
8 changes: 3 additions & 5 deletions test/test_bulk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions tools/synchro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
Loading