Skip to content

Commit

Permalink
chore: Use Protobuf Message instead of GeneratedMessageV3 (#3435)
Browse files Browse the repository at this point in the history
  • Loading branch information
lqiu96 authored Dec 4, 2024
1 parent f121ca9 commit e6884d9
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
import com.google.common.collect.Range;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.GeneratedMessageV3;
import com.google.protobuf.Message;
import com.google.spanner.v1.BatchCreateSessionsRequest;
import com.google.spanner.v1.BeginTransactionRequest;
import com.google.spanner.v1.CommitRequest;
Expand Down Expand Up @@ -346,7 +346,7 @@ public void asyncTransactionManagerFireAndForgetInvalidUpdate() throws Exception
}
}
}
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class,
// The first update that fails. This will cause a transaction retry.
Expand Down Expand Up @@ -671,7 +671,7 @@ public void asyncTransactionManagerFireAndForgetInvalidBatchUpdate() throws Exce
}
}
}
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class,
ExecuteBatchDmlRequest.class,
Expand Down Expand Up @@ -714,7 +714,7 @@ public void asyncTransactionManagerBatchUpdateAborted() throws Exception {
assertThat(attempt.get()).isEqualTo(2);
// There should only be 1 CommitRequest, as the first attempt should abort already after the
// ExecuteBatchDmlRequest.
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class,
ExecuteBatchDmlRequest.class,
Expand Down Expand Up @@ -756,7 +756,7 @@ public void asyncTransactionManagerBatchUpdateAbortedBeforeFirstStatement() thro
assertThat(attempt.get()).isEqualTo(2);
// There should only be 1 CommitRequest, as the first attempt should abort already after the
// ExecuteBatchDmlRequest.
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class,
ExecuteBatchDmlRequest.class,
Expand Down Expand Up @@ -816,7 +816,7 @@ public void asyncTransactionManagerWithBatchUpdateCommitAborted() throws Excepti
} finally {
mockSpanner.putStatementResult(StatementResult.update(UPDATE_STATEMENT, UPDATE_COUNT));
}
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class,
ExecuteBatchDmlRequest.class,
Expand Down Expand Up @@ -914,7 +914,7 @@ public void asyncTransactionManagerWithBatchUpdateCommitFails() {
assertThat(e.getErrorCode()).isEqualTo(ErrorCode.INVALID_ARGUMENT);
assertThat(e.getMessage()).contains("mutation limit exceeded");
}
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class);
if (isMultiplexedSessionsEnabled()) {
Expand Down Expand Up @@ -945,7 +945,7 @@ public void asyncTransactionManagerWaitsUntilAsyncBatchUpdateHasFinished() throw
}
}
}
ImmutableList<Class<? extends GeneratedMessageV3>> expectedRequests =
ImmutableList<Class<? extends Message>> expectedRequests =
ImmutableList.of(
BatchCreateSessionsRequest.class, ExecuteBatchDmlRequest.class, CommitRequest.class);
if (isMultiplexedSessionsEnabled()) {
Expand Down

0 comments on commit e6884d9

Please sign in to comment.