Skip to content

Commit 0406ded

Browse files
fix: Fix for flaky test_read_timestamp_client_side_autocommit test (#1071)
* fix: Fix for flaky test_read_timestamp_client_side_autocommit test * Adding a row between 2 transactions so that read timestamp are different for the 2 transactions --------- Co-authored-by: Sri Harsha CH <[email protected]>
1 parent 63daa8a commit 0406ded

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/system/test_dbapi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ def test_read_timestamp_client_side_autocommit(self):
420420
assert self._cursor.description[0].name == "SHOW_READ_TIMESTAMP"
421421
assert isinstance(read_timestamp_query_result_1[0][0], DatetimeWithNanoseconds)
422422

423+
self._conn.read_only = False
424+
self._insert_row(3)
425+
426+
self._conn.read_only = True
423427
self._cursor.execute("SELECT * FROM contacts")
424428
self._cursor.execute("SHOW VARIABLE READ_TIMESTAMP")
425429
read_timestamp_query_result_2 = self._cursor.fetchall()

0 commit comments

Comments
 (0)