Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 9005b2b

Browse files
committed
fix: Flaky system test test_batch_dml
Loosen assertion on ExecuteBatchDml RPC count to allow for retries. Previously asserted exactly 3 calls, but transient errors can cause retries, leading to failure (e.g. 4 calls). Changed assertion to >= 3.
1 parent 7e81930 commit 9005b2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/system/test_dbapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def test_batch_dml(self, auto_commit, dbapi_database):
541541
self._cursor.execute("SELECT * FROM contacts")
542542
assert len(self._cursor.fetchall()) == 9
543543
# Test that ExecuteBatchDml rpc is called
544-
assert method_count_interceptor._counts[EXECUTE_BATCH_DML_METHOD] == 3
544+
assert method_count_interceptor._counts[EXECUTE_BATCH_DML_METHOD] >= 3
545545

546546
def test_abort_batch_dml(self):
547547
"""Test abort batch dml."""

0 commit comments

Comments
 (0)