Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit cf39158

Browse files
committed
add verifySameChannelId back and fix partitionDML test
1 parent ce43d4a commit cf39158

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,8 @@ public GapicSpannerRpc(final SpannerOptions options) {
478478
.withCheckInterval(pdmlSettings.getStreamWatchdogCheckInterval()));
479479
}
480480
this.partitionedDmlStub =
481-
GrpcSpannerStubWithStubSettingsAndClientContext.create(pdmlSettings.build());
481+
GrpcSpannerStubWithStubSettingsAndClientContext.create(
482+
pdmlSettings.build(), clientContext);
482483
this.instanceAdminStubSettings =
483484
options.getInstanceAdminStubSettings().toBuilder()
484485
.setTransportChannelProvider(channelProvider)

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ public void testPartitionedDml() {
533533
XGoogSpannerRequestId.of(getClientId(), -1, 1, 1),
534534
XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)),
535535
actual);
536-
// Channel ID is determined by grpc-gcp, so we don't verify same channel ID here.
536+
verifySameChannelId(actual);
537537
}
538538

539539
@Test
@@ -559,7 +559,7 @@ public void testPartitionedDmlError() {
559559
XGoogSpannerRequestId.of(getClientId(), -1, 1, 1),
560560
XGoogSpannerRequestId.of(getClientId(), -1, 2, 1)),
561561
actual);
562-
// Channel ID is determined by grpc-gcp, so we don't verify same channel ID here.
562+
verifySameChannelId(actual);
563563
assertEquals(XGoogSpannerRequestId.of(exception.getRequestId()), actual.get(1));
564564
}
565565

@@ -586,7 +586,7 @@ public void testPartitionedDmlAborted() {
586586
XGoogSpannerRequestId.of(getClientId(), -1, 3, 1),
587587
XGoogSpannerRequestId.of(getClientId(), -1, 4, 1)),
588588
actual);
589-
// Channel ID is determined by grpc-gcp, so we don't verify same channel ID here.
589+
verifySameChannelId(actual);
590590
}
591591

592592
@Test
@@ -612,7 +612,7 @@ public void testPartitionedDmlUnavailable() {
612612
XGoogSpannerRequestId.of(getClientId(), -1, 3, 1),
613613
XGoogSpannerRequestId.of(getClientId(), -1, 4, 1)),
614614
actual);
615-
// Channel ID is determined by grpc-gcp, so we don't verify same channel ID here.
615+
verifySameChannelId(actual);
616616
}
617617

618618
@Test
@@ -648,7 +648,7 @@ public void testPartitionedDmlUnavailableWithResumeToken() {
648648
XGoogSpannerRequestId.of(getClientId(), -1, 2, 1),
649649
XGoogSpannerRequestId.of(getClientId(), -1, 2, 2)),
650650
actual);
651-
// Channel ID is determined by grpc-gcp, so we don't verify same channel ID here.
651+
verifySameChannelId(actual);
652652
}
653653

654654
@Test

0 commit comments

Comments
 (0)