Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.3] tests/robustness: switch to kill if no panic after 10sec #817

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/robustness/powerfailure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func doPowerFailure(t *testing.T, du time.Duration, fsType dmflakey.FSType, mkfs
"-path", dbPath,
"-count=1000000000",
"-batch-size=5", // separate total count into multiple truncation
"-value-size=512",
}

logPath := filepath.Join(t.TempDir(), fmt.Sprintf("%s.log", t.Name()))
Expand Down Expand Up @@ -196,7 +197,7 @@ func doPowerFailure(t *testing.T, du time.Duration, fsType dmflakey.FSType, mkfs

select {
case <-time.After(10 * time.Second):
t.Error("bbolt should stop with panic in seconds")
t.Log("bbolt is supposed to be already stopped, but actually not yet; forcibly kill it")
assert.NoError(t, cmd.Process.Kill())
case err := <-errCh:
require.Error(t, err)
Expand Down
Loading