1
0
Fork 0

Fix checkpoint test

master
Philip O'Toole 8 months ago
parent 9aab1169bd
commit ec91f1b7c5

@ -50,10 +50,6 @@ var (
// ErrWALReplayDirectoryMismatch is returned when the WAL file(s) are not in the same
// directory as the database file.
ErrWALReplayDirectoryMismatch = errors.New("WAL file(s) not in same directory as database file")
// ErrCheckpointTimeout is returned when a checkpoint does not complete within the
// given duration.
ErrCheckpointTimeout = errors.New("checkpoint timeout")
)
// CheckpointMode is the mode in which a checkpoint runs.

@ -154,8 +154,8 @@ func Test_WALDatabaseCheckpoint_RestartTimeout(t *testing.T) {
t.Fatalf("expected %s, got %s", exp, got)
}
if err := db.CheckpointWithTimeout(CheckpointTruncate, 250*time.Millisecond); err != ErrCheckpointTimeout {
t.Fatal("expected timeout error")
if err := db.CheckpointWithTimeout(CheckpointTruncate, 250*time.Millisecond); err == nil {
t.Fatal("expected error due to failure to checkpoint")
}
blockingDB.Close()

Loading…
Cancel
Save