Skip to content

Commit 83c41dc

Browse files
committed
db: deflake TestOpenRecovery
The file numbers are non-deterministic. Fix #5439. Fix #5440. Fix #5441. Fix #5442.
1 parent fc29b04 commit 83c41dc

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

open_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func TestOpenRecovery(t *testing.T) {
325325
return err.Error()
326326
}
327327
waitForCompactionsAndTableStats(d)
328-
return runLSMCmd(td, d)
328+
return "ok"
329329
default:
330330
return fmt.Sprintf("unrecognized command %q", td.Cmd)
331331
}

testdata/open_recovery

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ set e foo
3535

3636
reopen auto-compactions=on inject-errors=((RandomLatency "5ms" 1 (And OpFileWrite (PathMatch "*.sst"))))
3737
----
38-
L5:
39-
000012:[b#3,SET-e#10,SET]
40-
L6:
41-
000006:[c#0,SET-d#0,SET]
38+
ok
39+
40+
# Ensure closing and re-opening again succeeds (and the previous reopen didn't
41+
# accidentally delete a necessary sstable).
42+
43+
reopen
44+
----
45+
ok

0 commit comments

Comments
 (0)