forked from weaselab/conflict-set
Update InternalVersionT::zero in addWrite call
There can be other conflict sets in the same thread
This commit is contained in:
@@ -56,6 +56,20 @@ def test_conflict_set():
|
||||
assert cs.check(read(0, key), read(1, key)) == [Result.TOO_OLD, Result.COMMIT]
|
||||
|
||||
|
||||
def test_update_zero():
|
||||
with DebugConflictSet() as cs1:
|
||||
with DebugConflictSet() as cs2:
|
||||
cs1.addWrites(2, write(b""))
|
||||
cs1.setOldestVersion(2)
|
||||
# "zero" is now 2
|
||||
|
||||
# make a Node48
|
||||
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])))
|
||||
|
||||
|
||||
def test_inner_full_words():
|
||||
with DebugConflictSet() as cs:
|
||||
cs.addWrites(1, write(b"\x3f\x61"), write(b"\x81\x61"))
|
||||
|
||||
Reference in New Issue
Block a user