Skip to content

chore: Use Protobuf Message instead of GeneratedMessageV3 #3435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading