File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
import com.google.cloud.spanner.encryption.EncryptionConfigs;
3131
import com.google.spanner.admin.database.v1.RestoreDatabaseMetadata;
3232
import java.util.concurrent.ExecutionException;
33-
import java.util.concurrent.TimeUnit;
34-
import java.util.concurrent.TimeoutException;
3533

3634
public class RestoreBackupWithEncryptionKey {
3735

@@ -71,17 +69,14 @@ static Void restoreBackupWithEncryptionKey(DatabaseAdminClient adminClient,
7169
Database database;
7270
try {
7371
System.out.println("Waiting for operation to complete...");
74-
database = operation.get(1600, TimeUnit.SECONDS);
72+
database = operation.get();
7573
} catch (ExecutionException e) {
7674
// If the operation failed during execution, expose the cause.
7775
throw SpannerExceptionFactory.asSpannerException(e.getCause());
7876
} catch (InterruptedException e) {
7977
// Throw when a thread is waiting, sleeping, or otherwise occupied,
8078
// and the thread is interrupted, either before or during the activity.
8179
throw SpannerExceptionFactory.propagateInterrupt(e);
82-
} catch (TimeoutException e) {
83-
// If the operation timed out propagates the timeout
84-
throw SpannerExceptionFactory.propagateTimeout(e);
8580
}
8681

8782
System.out.printf(

0 commit comments

Comments
 (0)