Skip to content

Commit

Permalink
Merge #131039
Browse files Browse the repository at this point in the history
131039: roachtest: reduce expected backup-restore runtime r=azhu-crl a=msbutler

We have seen the backup-restore/roundtrip tests timeout for no apparent reason. This patch reduces the expected amount of work these tests do.

Informs #130741

Release note: none

Co-authored-by: Michael Butler <[email protected]>
  • Loading branch information
craig[bot] and msbutler committed Sep 26, 2024
2 parents 61fe812 + 45b46ba commit c7cc32f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/backup_restore_roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var (
}
)

const numFullBackups = 5
const numFullBackups = 3

type roundTripSpecs struct {
name string
Expand Down
5 changes: 2 additions & 3 deletions pkg/cmd/roachtest/tests/mixed_version_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ var (
possibleNumIncrementalBackups = []int{
1,
3,
5,
}

schemaChangeDB = "schemachange"
Expand Down Expand Up @@ -477,7 +476,7 @@ func randString(rng *rand.Rand, strLen int) string {
}

func randWaitDuration(rng *rand.Rand) time.Duration {
durations := []int{1, 10, 60, 5 * 60}
durations := []int{1, 10, 60}
return time.Duration(durations[rng.Intn(len(durations))]) * time.Second
}

Expand Down Expand Up @@ -1637,7 +1636,7 @@ func (mvb *mixedVersionBackup) maybeTakePreviousVersionBackup(
return mvb.createBackupCollection(ctx, l, rng, executeOnAllNodesSpec, executeOnAllNodesSpec, h, label)
}

// randomWait waits from 1s to 5m, to allow for the background
// randomWait waits from 1s to 3m, to allow for the background
// workloads to update the databases we are backing up.
func (d *BackupRestoreTestDriver) randomWait(l *logger.Logger, rng *rand.Rand) {
dur := randWaitDuration(rng)
Expand Down

0 comments on commit c7cc32f

Please sign in to comment.