Fix test-only bug in script test
Previously conflict_set.py only worked for checking one read conflict per call
This commit is contained in:
@@ -115,7 +115,9 @@ class ConflictSet:
|
||||
|
||||
def check(self, *reads: ReadRange) -> list[Result]:
|
||||
r = (ctypes.c_int * len(reads))()
|
||||
self._lib.ConflictSet_check(self.p, *reads, r, 1)
|
||||
self._lib.ConflictSet_check(
|
||||
self.p, (ReadRange * len(reads))(*reads), r, len(reads)
|
||||
)
|
||||
return [Result(x) for x in r]
|
||||
|
||||
def setOldestVersion(self, version: int) -> None:
|
||||
|
@@ -1 +0,0 @@
|
||||
\providecommand{\versionnumber}{0.0.6}
|
@@ -53,7 +53,7 @@ def test_conflict_set():
|
||||
assert cs.getBytes() - before > 0
|
||||
assert cs.check(read(0, key)) == [Result.CONFLICT]
|
||||
cs.setOldestVersion(1)
|
||||
assert cs.check(read(0, key)) == [Result.TOO_OLD]
|
||||
assert cs.check(read(0, key), read(1, key)) == [Result.TOO_OLD, Result.COMMIT]
|
||||
|
||||
|
||||
def test_inner_full_words():
|
||||
|
Reference in New Issue
Block a user