Skip to content

Commit

Permalink
check db version
Browse files Browse the repository at this point in the history
  • Loading branch information
tantaman committed Jan 6, 2024
1 parent 3a39098 commit aa9a9b0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions py/correctness/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,9 @@ def test_merge_same_w_tie_breaker():
sync_left_to_right(db2, db1, 0)
changes21 = db1.execute("SELECT \"table\", pk, cid, val, col_version, site_id FROM crsql_changes").fetchall()

pprint.pprint(db1.execute("SELECT db_version FROM crsql_changes").fetchall())
pprint.pprint(db2.execute("SELECT db_version FROM crsql_changes").fetchall())

assert (changes12 == changes21)
# Test that we're stable / do not loop when we tie break equal values

Expand All @@ -408,6 +411,9 @@ def test_merge_same_w_tie_breaker():
assert (changes12_2 == changes21)
assert (changes12 == changes21_2)

pprint.pprint(db1.execute("SELECT db_version FROM crsql_changes").fetchall())
pprint.pprint(db2.execute("SELECT db_version FROM crsql_changes").fetchall())


def test_merge_matching_clocks_lesser_value():
def make_dbs():
Expand Down

0 comments on commit aa9a9b0

Please sign in to comment.