Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
124275: roachtest: minor improvements to `backup-restore/round-trip` r=DarrylWong a=renatolabs

Specifically:

* no need to check for clouds in the `Run` function; we can use the `CompatibleClouds` field to limit where the test can run.
* no need to upload a cockroach binary before the test runs.

Epic: none

Release note: None

Co-authored-by: Renato Costa <renato@cockroachlabs.com>
  • Loading branch information
craig[bot] and renatolabs committed May 18, 2024
2 parents e60b492 + 36999a2 commit 93ad913
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pkg/cmd/roachtest/tests/backup_restore_roundtrip.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ type roundTripSpecs struct {
}

func registerBackupRestoreRoundTrip(r registry.Registry) {

for _, sp := range []roundTripSpecs{
{
name: "backup-restore/round-trip",
Expand Down Expand Up @@ -86,9 +85,10 @@ func registerBackupRestoreRoundTrip(r registry.Registry) {
EncryptionSupport: registry.EncryptionMetamorphic,
RequiresLicense: true,
NativeLibs: registry.LibGEOS,
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Skip: sp.skip,
// See https://github.com/cockroachdb/cockroach/issues/105968
CompatibleClouds: registry.Clouds(spec.GCE, spec.Local),
Suites: registry.Suites(registry.Nightly),
Skip: sp.skip,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
backupRestoreRoundTrip(ctx, t, c, sp)
},
Expand All @@ -101,18 +101,12 @@ func registerBackupRestoreRoundTrip(r registry.Registry) {
func backupRestoreRoundTrip(
ctx context.Context, t test.Test, c cluster.Cluster, sp roundTripSpecs,
) {
if c.Cloud() != spec.GCE && !c.IsLocal() {
t.Skip("uses gs://cockroachdb-backup-testing; see https://github.com/cockroachdb/cockroach/issues/105968")
}
pauseProbability := 0.2
roachNodes := c.Range(1, c.Spec().NodeCount-1)
workloadNode := c.Node(c.Spec().NodeCount)
testRNG, seed := randutil.NewLockedPseudoRand()
t.L().Printf("random seed: %d", seed)

// Upload cockroach and start cluster.
uploadCockroach(ctx, t, c, c.All(), clusterupgrade.CurrentVersion())

envOption := install.EnvOption([]string{
"COCKROACH_MIN_RANGE_MAX_BYTES=1",
})
Expand Down

0 comments on commit 93ad913

Please sign in to comment.