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

roachtest: always unstall on disk-stall failure #103198

Merged
merged 1 commit into from
May 18, 2023
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
10 changes: 9 additions & 1 deletion pkg/cmd/roachtest/tests/disk_stall.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,15 @@ func runDiskStalledDetection(
m.ExpectDeath()
}
s.Stall(ctx, c.Node(1))
defer s.Unstall(ctx, c.Node(1))
{
// NB: We use a background context in the defer'ed unstall command,
// otherwise on test failure our c.Run calls will be ignored. Leaving
// the disk stalled will prevent artifact collection, making debugging
// difficult.
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
defer cancel()
defer s.Unstall(ctx, c.Node(1))
}

// Wait twice the maximum sync duration and check if our SQL connection to
// node 1 is still alive. It should've been terminated.
Expand Down