From d28ba7868b1a1f1a142147af3b5cdc6129bed505 Mon Sep 17 00:00:00 2001 From: rahul2393 Date: Tue, 12 Oct 2021 11:44:06 +0530 Subject: [PATCH] test(spanner): fix flaky TestIntegration_StartBackupOperation test (#4978) * fix(spanner): fix flaky TestIntegration_StartBackupOperation test * fix(spanner): fix flaky TestIntegration_StartBackupOperation test Co-authored-by: Rahul Yadav --- spanner/integration_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spanner/integration_test.go b/spanner/integration_test.go index 84de686175dc..4cebb06a16d7 100644 --- a/spanner/integration_test.go +++ b/spanner/integration_test.go @@ -3171,8 +3171,9 @@ func TestIntegration_StartBackupOperation(t *testing.T) { skipEmulatorTest(t) t.Parallel() - // Backups can be slow, so use a 30 minute timeout. - ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute) + startTime := time.Now() + // Backups can be slow, so use 1 hour timeout. + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Hour) defer cancel() _, testDatabaseName, cleanup := prepareIntegrationTest(ctx, t, DefaultSessionPoolConfig, backuDBStatements) defer cleanup() @@ -3190,6 +3191,7 @@ func TestIntegration_StartBackupOperation(t *testing.T) { if err != nil { t.Fatal(err) } + t.Logf("create backup operation took: %v\n", time.Since(startTime)) respMetadata, err := respLRO.Metadata() if err != nil { t.Fatalf("backup response metadata, got error %v, want nil", err)