add a few more flash tests

Former-commit-id: b19fdc23a9a39ae718580feae5049f6906caec28
This commit is contained in:
malavan 2021-08-23 21:30:16 +00:00
parent a1bbb17a5d
commit 9bedb29fb6

View File

@ -12,6 +12,16 @@ start_server [list tags {flash} overrides [list storage-provider {flash ./rocks.
assert_equal {0} [r dbsize] "Key count is accurate after non-existant delete"
}
test { DEL of flushed key works } {
r flushall
r set testkey foo
assert_equal {1} [r dbsize] "Only one key after first insert"
r flushall cache
assert_equal {foo} [r get testkey] "Value still there after flushing cache"
r del testkey
assert_equal {0} [r dbsize] "No keys after delete"
}
test { SET of existing but flushed key works } {
r flushall
r set testkey foo
@ -99,6 +109,16 @@ start_server [list tags {flash} overrides [list storage-provider {flash ./rocks.
assert_equal $expectedDigest [r debug digest]
}
test { DELETE of flushed set member persists after another flush } {
r flushall
r sadd set1 val1 val2 val3
assert_equal {3} [r scard set1]
r flushall cache
r srem set1 val1
r flushall cache
assert_equal {2} [r scard set1]
}
r flushall
# If a weak storage memory model is set, wait for any pending snapshot writes to finish
after 500