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

backupccl: ensure restore2TB/nodes=10/with-pause pauses at least once #91024

Merged
merged 1 commit into from
Nov 1, 2022
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
7 changes: 6 additions & 1 deletion pkg/cmd/roachtest/tests/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ func registerRestore(r registry.Registry) {

jobIDCh := make(chan jobspb.JobID)
jobCompleteCh := make(chan struct{}, 1)
maxPauses := 3
m.Go(func(ctx context.Context) error {
// Wait until the restore job has been created.
conn, err := c.ConnE(ctx, t.L(), c.Node(1)[0])
Expand All @@ -547,7 +548,6 @@ func registerRestore(r registry.Registry) {
//
// Limit the number of pauses to 3 to ensure that the test doesn't get
// into a pause-resume-slowdown spiral that eventually times out.
maxPauses := 3
pauseJobTick := time.NewTicker(time.Minute * 15)
defer pauseJobTick.Stop()
for {
Expand Down Expand Up @@ -653,6 +653,11 @@ func registerRestore(r registry.Registry) {
return nil
})
m.Wait()
// All failures from the above go routines surface via a t.Fatal() within
// the m.Wait( ) call above; therefore, at this point, the restore job
// should have succeeded. This final check ensures this test is actually
// doing its job: causing the restore job to pause at least once.
require.NotEqual(t, 3, maxPauses, "the job should have paused at least once")
},
})
}
Expand Down