Skip to content

Commit 96a7e6f

Browse files
chore(spanner): increase backup operation timeout in samples to 3600s (#14033)
1 parent a403703 commit 96a7e6f

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

java-spanner/samples/snippets/src/main/java/com/example/spanner/CreateBackupWithEncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static Void createBackupWithEncryptionKey(DatabaseAdminClient adminClient,
8383
.setKmsKeyName(kmsKeyName).build()).build();
8484
try {
8585
System.out.println("Waiting for operation to complete...");
86-
backup = adminClient.createBackupAsync(request).get(1200, TimeUnit.SECONDS);
86+
backup = adminClient.createBackupAsync(request).get(3600, TimeUnit.SECONDS);
8787
} catch (ExecutionException e) {
8888
// If the operation failed during execution, expose the cause.
8989
throw SpannerExceptionFactory.asSpannerException(e.getCause());

java-spanner/samples/snippets/src/main/java/com/example/spanner/CreateBackupWithMultiRegionEncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static Void createBackupWithMultiRegionEncryptionKey(
9595
.build();
9696
try {
9797
System.out.println("Waiting for operation to complete...");
98-
backup = adminClient.createBackupAsync(request).get(1200, TimeUnit.SECONDS);
98+
backup = adminClient.createBackupAsync(request).get(3600, TimeUnit.SECONDS);
9999
} catch (ExecutionException e) {
100100
// If the operation failed during execution, expose the cause.
101101
throw SpannerExceptionFactory.asSpannerException(e.getCause());

java-spanner/samples/snippets/src/main/java/com/example/spanner/admin/archived/CreateBackupWithEncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static Void createBackupWithEncryptionKey(DatabaseAdminClient adminClient,
7777
Backup backup;
7878
try {
7979
System.out.println("Waiting for operation to complete...");
80-
backup = operation.get(1200, TimeUnit.SECONDS);
80+
backup = operation.get(3600, TimeUnit.SECONDS);
8181
} catch (ExecutionException e) {
8282
// If the operation failed during execution, expose the cause.
8383
throw SpannerExceptionFactory.asSpannerException(e.getCause());

0 commit comments

Comments
 (0)