Skip to content

Commit 07acd81

Browse files
committed
t: sync before removing kvs module
Problem: In t2816-fsck-cmd.t several tests will write data to the KVS and immediately remove the module. There is a small potential window in which the checkpoint may not align with the desired test data. Call "flux kvs sync" before unloading the KVS.
1 parent 402f66b commit 07acd81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/t2816-fsck-cmd.t

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ test_expect_success 'make a reference invalid' '
8181
cat dirb.out | jq -c .data[1]=\"sha1-1234567890123456789012345678901234567890\" > dirbbad.out &&
8282
flux kvs put --treeobj dir.b="$(cat dirbbad.out)"
8383
'
84+
test_expect_success 'call sync to ensure we have checkpointed' '
85+
flux kvs sync
86+
'
8487
test_expect_success 'unload kvs' '
8588
flux module remove kvs
8689
'
@@ -110,6 +113,9 @@ test_expect_success 'make a reference invalid' '
110113
cat dircbad1.out | jq -c .data[2]=\"sha1-1234567890123456789012345678901234567890\" > dircbad2.out &&
111114
flux kvs put --treeobj dir.c="$(cat dircbad2.out)"
112115
'
116+
test_expect_success 'call sync to ensure we have checkpointed' '
117+
flux kvs sync
118+
'
113119
test_expect_success 'unload kvs' '
114120
flux module remove kvs
115121
'

0 commit comments

Comments
 (0)