Skip to content

Commit 8a90bef

Browse files
feat(restore_test): don't retry in tests (#4312)
Client side retries shouldn't be required for restore tests. On the other hand, they might hide some issues, so it's better to disable it by default.
1 parent 80c1aed commit 8a90bef

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Diff for: pkg/service/restore/helper_integration_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func newCluster(t *testing.T, hosts []string) clusterHelper {
6868
logger := log.NewDevelopmentWithLevel(zapcore.InfoLevel)
6969
hrt := NewHackableRoundTripper(scyllaclient.DefaultTransport())
7070
clientCfg := scyllaclient.TestConfig(hosts, AgentAuthToken())
71+
clientCfg.Backoff.MaxRetries = 0
7172
client := newTestClient(t, hrt, logger.Named("client"), &clientCfg)
7273

7374
for _, h := range hosts {

Diff for: pkg/service/restore/restore_integration_test.go

-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"time"
2121

2222
"github.com/pkg/errors"
23-
"github.com/scylladb/go-log"
2423
"github.com/scylladb/gocqlx/v2/qb"
2524
"github.com/scylladb/scylla-manager/backupspec"
2625
schematable "github.com/scylladb/scylla-manager/v3/pkg/schema/table"
@@ -35,7 +34,6 @@ import (
3534
"github.com/scylladb/scylla-manager/v3/pkg/util/query"
3635

3736
"github.com/scylladb/scylla-manager/v3/pkg/util/uuid"
38-
"go.uber.org/zap/zapcore"
3937
)
4038

4139
func TestRestoreTablesUserIntegration(t *testing.T) {
@@ -743,10 +741,6 @@ func TestRestoreTablesPreparationIntegration(t *testing.T) {
743741

744742
func TestRestoreTablesBatchRetryIntegration(t *testing.T) {
745743
h := newTestHelper(t, ManagedSecondClusterHosts(), ManagedClusterHosts())
746-
// Ensure no built-in retries
747-
clientCfg := scyllaclient.TestConfig(ManagedClusterHosts(), AgentAuthToken())
748-
clientCfg.Backoff.MaxRetries = 0
749-
h.dstCluster.Client = newTestClient(t, h.dstCluster.Hrt, log.NewDevelopmentWithLevel(zapcore.InfoLevel).Named("client"), &clientCfg)
750744

751745
Print("Keyspace setup")
752746
ksStmt := "CREATE KEYSPACE %q WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': %d}"

0 commit comments

Comments
 (0)