Skip to content
Permalink
Browse files
fix: make it possible to override backups methods (#195)
Currently `restoreDatabase`, `updateBackup` and `deleteBackup` are final methods. For some internal tests, we need to override these methods so ideally they shouldn't be final.
  • Loading branch information
skuruppu committed May 8, 2020
1 parent 3b258cf commit 2d19c25ba32847d116194565e67e1b1276fcb9f8
Showing with 3 additions and 3 deletions.
  1. +3 −3 google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
@@ -853,7 +853,7 @@ public Timestamp apply(Operation input) {
}

@Override
public final OperationFuture<Database, RestoreDatabaseMetadata> restoreDatabase(
public OperationFuture<Database, RestoreDatabaseMetadata> restoreDatabase(
final String databaseInstanceName, final String databaseId, String backupName) {
RestoreDatabaseRequest request =
RestoreDatabaseRequest.newBuilder()
@@ -905,7 +905,7 @@ public Timestamp apply(Operation input) {
}

@Override
public final Backup updateBackup(Backup backup, FieldMask updateMask) {
public Backup updateBackup(Backup backup, FieldMask updateMask) {
acquireAdministrativeRequestsRateLimiter();
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder().setBackup(backup).setUpdateMask(updateMask).build();
@@ -914,7 +914,7 @@ public final Backup updateBackup(Backup backup, FieldMask updateMask) {
}

@Override
public final void deleteBackup(String backupName) {
public void deleteBackup(String backupName) {
acquireAdministrativeRequestsRateLimiter();
DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(backupName).build();
GrpcCallContext context = newCallContext(null, backupName);

0 comments on commit 2d19c25

Please sign in to comment.