Skip to content

Commit

Permalink
fix: Fix for flaky test_read_timestamp_client_side_autocommit test (#…
Browse files Browse the repository at this point in the history
…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]>
  • Loading branch information
ankiaga and harshachinta authored Jan 10, 2024
1 parent 63daa8a commit 0406ded
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/system/test_dbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@ def test_read_timestamp_client_side_autocommit(self):
assert self._cursor.description[0].name == "SHOW_READ_TIMESTAMP"
assert isinstance(read_timestamp_query_result_1[0][0], DatetimeWithNanoseconds)

self._conn.read_only = False
self._insert_row(3)

self._conn.read_only = True
self._cursor.execute("SELECT * FROM contacts")
self._cursor.execute("SHOW VARIABLE READ_TIMESTAMP")
read_timestamp_query_result_2 = self._cursor.fetchall()
Expand Down

0 comments on commit 0406ded

Please sign in to comment.