Skip to content

Commit e6884d9

Browse files
authored
chore: Use Protobuf Message instead of GeneratedMessageV3 (#3435)
1 parent f121ca9 commit e6884d9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/AsyncTransactionManagerTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
import com.google.common.collect.Range;
4747
import com.google.common.util.concurrent.MoreExecutors;
4848
import com.google.protobuf.AbstractMessage;
49-
import com.google.protobuf.GeneratedMessageV3;
49+
import com.google.protobuf.Message;
5050
import com.google.spanner.v1.BatchCreateSessionsRequest;
5151
import com.google.spanner.v1.BeginTransactionRequest;
5252
import com.google.spanner.v1.CommitRequest;
@@ -346,7 +346,7 @@ public void asyncTransactionManagerFireAndForgetInvalidUpdate() throws Exception
346346
}
347347
}
348348
}
349-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
349+
ImmutableList<Class<? extends Message>> expectedRequests =
350350
ImmutableList.of(
351351
BatchCreateSessionsRequest.class,
352352
// The first update that fails. This will cause a transaction retry.
@@ -671,7 +671,7 @@ public void asyncTransactionManagerFireAndForgetInvalidBatchUpdate() throws Exce
671671
}
672672
}
673673
}
674-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
674+
ImmutableList<Class<? extends Message>> expectedRequests =
675675
ImmutableList.of(
676676
BatchCreateSessionsRequest.class,
677677
ExecuteBatchDmlRequest.class,
@@ -714,7 +714,7 @@ public void asyncTransactionManagerBatchUpdateAborted() throws Exception {
714714
assertThat(attempt.get()).isEqualTo(2);
715715
// There should only be 1 CommitRequest, as the first attempt should abort already after the
716716
// ExecuteBatchDmlRequest.
717-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
717+
ImmutableList<Class<? extends Message>> expectedRequests =
718718
ImmutableList.of(
719719
BatchCreateSessionsRequest.class,
720720
ExecuteBatchDmlRequest.class,
@@ -756,7 +756,7 @@ public void asyncTransactionManagerBatchUpdateAbortedBeforeFirstStatement() thro
756756
assertThat(attempt.get()).isEqualTo(2);
757757
// There should only be 1 CommitRequest, as the first attempt should abort already after the
758758
// ExecuteBatchDmlRequest.
759-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
759+
ImmutableList<Class<? extends Message>> expectedRequests =
760760
ImmutableList.of(
761761
BatchCreateSessionsRequest.class,
762762
ExecuteBatchDmlRequest.class,
@@ -816,7 +816,7 @@ public void asyncTransactionManagerWithBatchUpdateCommitAborted() throws Excepti
816816
} finally {
817817
mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT));
818818
}
819-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
819+
ImmutableList<Class<? extends Message>> expectedRequests =
820820
ImmutableList.of(
821821
BatchCreateSessionsRequest.class,
822822
ExecuteBatchDmlRequest.class,
@@ -914,7 +914,7 @@ public void asyncTransactionManagerWithBatchUpdateCommitFails() {
914914
assertThat(e.getErrorCode()).isEqualTo(ErrorCode.INVALID_ARGUMENT);
915915
assertThat(e.getMessage()).contains("mutation limit exceeded");
916916
}
917-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
917+
ImmutableList<Class<? extends Message>> expectedRequests =
918918
ImmutableList.of(
919919
BatchCreateSessionsRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class);
920920
if (isMultiplexedSessionsEnabled()) {
@@ -945,7 +945,7 @@ public void asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished() throw
945945
}
946946
}
947947
}
948-
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
948+
ImmutableList<Class<? extends Message>> expectedRequests =
949949
ImmutableList.of(
950950
BatchCreateSessionsRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class);
951951
if (isMultiplexedSessionsEnabled()) {

0 commit comments

Comments
 (0)