forked from weaselab/conflict-set
Merge pull request 'Assert return values in test_update_zero_should_commit / conflict' (#50) from weaselbot/conflict-set:weaselbot/issue-49 into main
Reviewed-on: weaselab/conflict-set#50
This commit is contained in:
@@ -68,7 +68,7 @@ def test_update_zero_should_commit():
|
||||
for i in range(256 - 17, 256):
|
||||
cs2.addWrites(int(1), write(bytes([i])))
|
||||
# Scan until first point write
|
||||
cs2.check(read(0, b"\x00", bytes([256 - 17])))
|
||||
assert cs2.check(read(0, b"\x00", bytes([256 - 17]))) == [Result.COMMIT]
|
||||
|
||||
|
||||
def test_update_zero_should_conflict():
|
||||
@@ -81,7 +81,7 @@ def test_update_zero_should_conflict():
|
||||
# "zero" is now 2**31 + 100
|
||||
cs1.addWrites(2**32 + 101, write(b"", b"\x02"), write(b"\x01"))
|
||||
# rangeVersion of \x01 is now 2**31 + 100 ("max" of (2**31 + 100, 2**32 + 101))
|
||||
cs1.check(read(2**32 + 1, b"\x00"))
|
||||
assert cs1.check(read(2**32 + 1, b"\x00")) == [Result.CONFLICT]
|
||||
# but 2**32 + 1 ">" 2**31 + 100 , and it incorrectly commits
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user