Skip to content

Commit a496898

Browse files
committed
More updates for tests
1 parent 16b07f6 commit a496898

File tree

6 files changed

+144
-36
lines changed

6 files changed

+144
-36
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractReadContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,7 @@ CloseableIterator<PartialResultSet> startStream(
10411041
}
10421042
builder.setRequestOptions(buildRequestOptions(readOptions));
10431043
this.incrementXGoogRequestIdAttempt();
1044+
this.xGoogRequestId.setChannelId(session.getChannel());
10441045
SpannerRpc.StreamingCall call =
10451046
rpc.read(
10461047
builder.build(),

google-cloud-spanner/src/main/java/com/google/cloud/spanner/ResumableStreamIterator.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,21 @@ private void backoffSleep(Context context, long backoffMillis) throws SpannerExc
198198

199199
public void incrementXGoogRequestIdAttempt() {
200200
if (this.xGoogRequestId == null) {
201+
System.out.println(
202+
"\033[34mXGoogRequestId.incrementXGoogAttempt: "
203+
+ this.xGoogRequestId
204+
+ " for:: "
205+
+ System.identityHashCode(this)
206+
+ "\033[00m");
201207
this.xGoogRequestId =
202208
this.xGoogRequestIdCreator.nextRequestId(1 /*TODO: infer channelId*/, 0 /*attempt*/);
203209
}
204210
this.xGoogRequestId.incrementAttempt();
211+
System.out.println(
212+
"\033[35mincrementXGoogAttempt: "
213+
+ this.xGoogRequestId
214+
+ " :: "
215+
+ System.identityHashCode(this));
205216
}
206217

207218
private enum DirectExecutor implements Executor {
@@ -347,7 +358,8 @@ private void startGrpcStreaming() {
347358
stream.requestPrefetchChunks();
348359
if (this.xGoogRequestId == null) {
349360
this.xGoogRequestId =
350-
this.xGoogRequestIdCreator.nextRequestId(1 /*TODO: retrieve channelId*/, 0);
361+
this.xGoogRequestIdCreator.nextRequestId(
362+
1 /* channelId shall be replaced by the instantiated class. */, 0);
351363
}
352364
}
353365
}

google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public class XGoogSpannerRequestId {
4242
static final long VERSION = 1; // The version of the specification being implemented.
4343

4444
private final long nthClientId;
45-
private final long nthChannelId;
4645
private final long nthRequest;
46+
private long nthChannelId;
4747
private long attempt;
4848

4949
XGoogSpannerRequestId(long nthClientId, long nthChannelId, long nthRequest, long attempt) {
@@ -177,9 +177,25 @@ public XGoogSpannerRequestId nextRequestId(long channelId, int attempt) {
177177
}
178178
}
179179

180+
public void setChannelId(long channelId) {
181+
this.nthChannelId = channelId;
182+
}
183+
180184
@VisibleForTesting
181185
XGoogSpannerRequestId withNthRequest(long replacementNthRequest) {
182186
return XGoogSpannerRequestId.of(
183187
this.nthClientId, this.nthChannelId, replacementNthRequest, this.attempt);
184188
}
189+
190+
@VisibleForTesting
191+
XGoogSpannerRequestId withChannelId(long replacementChannelId) {
192+
return XGoogSpannerRequestId.of(
193+
this.nthClientId, replacementChannelId, this.nthRequest, this.attempt);
194+
}
195+
196+
@VisibleForTesting
197+
XGoogSpannerRequestId withNthClientId(long replacementClientId) {
198+
return XGoogSpannerRequestId.of(
199+
replacementClientId, this.nthChannelId, this.nthRequest, this.attempt);
200+
}
185201
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,7 @@ public OperationFuture<ResponseT, MetadataT> call() {
797797

798798
return runWithRetryOnAdministrativeRequestsExceeded(
799799
() -> {
800+
System.out.println("withRetry: " + isRetry);
800801
String operationName = null;
801802
if (isRetry) {
802803
// Query the backend to see if the operation was actually created, and that the
@@ -2069,6 +2070,12 @@ GrpcCallContext withRequestId(GrpcCallContext context, Map<SpannerRpc.Option, ?>
20692070
return context;
20702071
}
20712072

2073+
System.out.println(
2074+
"\033[36mGapiSpannerRpc.withRequestId: "
2075+
+ reqId
2076+
+ " for: "
2077+
+ System.identityHashCode(context)
2078+
+ "\033[00m");
20722079
Map<String, List<String>> withReqId =
20732080
ImmutableMap.of(
20742081
XGoogSpannerRequestId.REQUEST_HEADER_KEY.name(),

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

Lines changed: 91 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,32 +2910,33 @@ public void testPartitionedDmlDoesNotTimeout() {
29102910
DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client);
29112911
int channelId = dbImpl.getSession().getChannel();
29122912
int dbId = dbImpl.dbId;
2913+
long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC;
29132914
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
29142915
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29152916
"google.spanner.v1.Spanner/ExecuteStreamingSql",
2916-
new XGoogSpannerRequestId(dbId, channelId, 5, 1)),
2917+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 5, 1)),
29172918
};
29182919
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
29192920

29202921
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
29212922
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29222923
"google.spanner.v1.Spanner/BatchCreateSessions",
2923-
new XGoogSpannerRequestId(dbId, 0, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2924+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, NON_DETERMINISTIC, 1)),
29242925
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29252926
"google.spanner.v1.Spanner/BatchCreateSessions",
2926-
new XGoogSpannerRequestId(dbId, 1, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2927+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, NON_DETERMINISTIC, 1)),
29272928
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29282929
"google.spanner.v1.Spanner/BatchCreateSessions",
2929-
new XGoogSpannerRequestId(dbId, 2, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2930+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 2, NON_DETERMINISTIC, 1)),
29302931
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29312932
"google.spanner.v1.Spanner/BatchCreateSessions",
2932-
new XGoogSpannerRequestId(dbId, 3, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2933+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 3, NON_DETERMINISTIC, 1)),
29332934
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29342935
"google.spanner.v1.Spanner/BeginTransaction",
2935-
new XGoogSpannerRequestId(dbId, channelId, 6, 1)),
2936+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)),
29362937
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29372938
"google.spanner.v1.Spanner/ExecuteSql",
2938-
new XGoogSpannerRequestId(dbId, channelId, 7, 1)),
2939+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 7, 1)),
29392940
};
29402941
xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIds(wantUnaryValues);
29412942
}
@@ -2976,30 +2977,36 @@ public void testPartitionedDmlWithLowerTimeout() {
29762977
DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client);
29772978
int channelId = dbImpl.getSession().getChannel();
29782979
int dbId = dbImpl.dbId;
2979-
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {};
2980+
long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC;
2981+
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
2982+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
2983+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
2984+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 5, 1)),
2985+
};
29802986
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
29812987

29822988
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
29832989
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29842990
"google.spanner.v1.Spanner/BatchCreateSessions",
2985-
new XGoogSpannerRequestId(dbId, 0, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2991+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, NON_DETERMINISTIC, 1)),
29862992
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29872993
"google.spanner.v1.Spanner/BatchCreateSessions",
2988-
new XGoogSpannerRequestId(dbId, 1, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2994+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, NON_DETERMINISTIC, 1)),
29892995
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29902996
"google.spanner.v1.Spanner/BatchCreateSessions",
2991-
new XGoogSpannerRequestId(dbId, 2, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
2997+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 2, NON_DETERMINISTIC, 1)),
29922998
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29932999
"google.spanner.v1.Spanner/BatchCreateSessions",
2994-
new XGoogSpannerRequestId(dbId, 3, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3000+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 3, NON_DETERMINISTIC, 1)),
29953001
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
29963002
"google.spanner.v1.Spanner/BeginTransaction",
2997-
new XGoogSpannerRequestId(dbId, channelId, 6, 1)),
3003+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)),
29983004
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
2999-
"google.spanner.v1.Spanner/Commit", new XGoogSpannerRequestId(dbId, channelId, 8, 1)),
3005+
"google.spanner.v1.Spanner/Commit",
3006+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 8, 1)),
30003007
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30013008
"google.spanner.v1.Spanner/ExecuteSql",
3002-
new XGoogSpannerRequestId(dbId, channelId, 7, 1)),
3009+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 7, 1)),
30033010
};
30043011
xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIds(wantUnaryValues);
30053012
}
@@ -3054,33 +3061,34 @@ public void testPartitionedDmlWithHigherTimeout() {
30543061
DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client);
30553062
int channelId = dbImpl.getSession().getChannel();
30563063
int dbId = dbImpl.dbId;
3064+
long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC;
30573065
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
30583066
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30593067
"google.spanner.v1.Spanner/ExecuteStreamingSql",
3060-
new XGoogSpannerRequestId(dbId, channelId, 5, 1)),
3068+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 5, 1)),
30613069
};
30623070

30633071
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
30643072

30653073
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
30663074
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30673075
"google.spanner.v1.Spanner/BatchCreateSessions",
3068-
new XGoogSpannerRequestId(dbId, 0, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3076+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, NON_DETERMINISTIC, 1)),
30693077
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30703078
"google.spanner.v1.Spanner/BatchCreateSessions",
3071-
new XGoogSpannerRequestId(dbId, 1, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3079+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, NON_DETERMINISTIC, 1)),
30723080
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30733081
"google.spanner.v1.Spanner/BatchCreateSessions",
3074-
new XGoogSpannerRequestId(dbId, 2, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3082+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 2, NON_DETERMINISTIC, 1)),
30753083
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30763084
"google.spanner.v1.Spanner/BatchCreateSessions",
3077-
new XGoogSpannerRequestId(dbId, 3, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3085+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 3, NON_DETERMINISTIC, 1)),
30783086
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30793087
"google.spanner.v1.Spanner/BeginTransaction",
3080-
new XGoogSpannerRequestId(dbId, channelId, 6, 1)),
3088+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)),
30813089
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
30823090
"google.spanner.v1.Spanner/ExecuteSql",
3083-
new XGoogSpannerRequestId(dbId, channelId, 7, 1)),
3091+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 7, 1)),
30843092
};
30853093
xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIds(wantUnaryValues);
30863094
}
@@ -3104,30 +3112,31 @@ public void testPartitionedDmlRetriesOnUnavailable() {
31043112
DatabaseClientImpl dbImpl = ((DatabaseClientImpl) client);
31053113
int channelId = dbImpl.getSession().getChannel();
31063114
int dbId = dbImpl.dbId;
3115+
long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC;
31073116
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
31083117
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31093118
"google.spanner.v1.Spanner/ExecuteStreamingSql",
3110-
new XGoogSpannerRequestId(dbId, channelId, 5, 1)),
3119+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 5, 1)),
31113120
};
31123121

31133122
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
31143123

31153124
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
31163125
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31173126
"google.spanner.v1.Spanner/BatchCreateSessions",
3118-
new XGoogSpannerRequestId(dbId, 0, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3127+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, NON_DETERMINISTIC, 1)),
31193128
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31203129
"google.spanner.v1.Spanner/BatchCreateSessions",
3121-
new XGoogSpannerRequestId(dbId, 1, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3130+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, NON_DETERMINISTIC, 1)),
31223131
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31233132
"google.spanner.v1.Spanner/BatchCreateSessions",
3124-
new XGoogSpannerRequestId(dbId, 2, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3133+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 2, NON_DETERMINISTIC, 1)),
31253134
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31263135
"google.spanner.v1.Spanner/BatchCreateSessions",
3127-
new XGoogSpannerRequestId(dbId, 3, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
3136+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 3, NON_DETERMINISTIC, 1)),
31283137
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
31293138
"google.spanner.v1.Spanner/BeginTransaction",
3130-
new XGoogSpannerRequestId(dbId, channelId, 6, 1)),
3139+
new XGoogSpannerRequestId(NON_DETERMINISTIC, channelId, 6, 1)),
31313140
};
31323141
xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIds(wantUnaryValues);
31333142
}
@@ -3540,8 +3549,11 @@ public void testNestedTransactionsUsingTwoDatabases() throws InterruptedExceptio
35403549

35413550
int channelId = client1.getSession().getChannel();
35423551
int dbId = client1.dbId;
3543-
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {};
3544-
3552+
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
3553+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
3554+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
3555+
new XGoogSpannerRequestId(dbId, 1, 5, 1)),
3556+
};
35453557
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
35463558

35473559
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
@@ -5375,20 +5387,66 @@ public void testRetryOnResourceExhausted() {
53755387
DatabaseClientImpl dbClient = (DatabaseClientImpl) client;
53765388
int channelId = dbClient.getSession().getChannel();
53775389
int dbId = dbClient.dbId;
5390+
long NON_DETERMINISTIC = XGoogSpannerRequestIdTest.NON_DETERMINISTIC;
53785391
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantStreamingValues = {
53795392
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
53805393
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5381-
new XGoogSpannerRequestId(dbId, 1, 5, 1)),
5394+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5395+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5396+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5397+
new XGoogSpannerRequestId(dbId, 1, 6, 1)),
5398+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5399+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5400+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 7, 1)),
5401+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5402+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5403+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 8, 1)),
5404+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5405+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5406+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5407+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5408+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5409+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5410+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5411+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5412+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5413+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5414+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5415+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5416+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5417+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5418+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5419+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5420+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5421+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5422+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5423+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5424+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5425+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5426+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5427+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5428+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5429+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5430+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5431+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5432+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5433+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5434+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5435+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5436+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
5437+
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
5438+
"google.spanner.v1.Spanner/ExecuteStreamingSql",
5439+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, 5, 1)),
53825440
};
53835441
xGoogReqIdInterceptor.checkExpectedStreamingXGoogRequestIds(wantStreamingValues);
53845442

53855443
XGoogSpannerRequestIdTest.MethodAndRequestId[] wantUnaryValues = {
53865444
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
53875445
"google.spanner.v1.Spanner/BatchCreateSessions",
5388-
new XGoogSpannerRequestId(dbId, 0, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
5446+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 0, NON_DETERMINISTIC, 1)),
53895447
XGoogSpannerRequestIdTest.ofMethodAndRequestId(
53905448
"google.spanner.v1.Spanner/BatchCreateSessions",
5391-
new XGoogSpannerRequestId(dbId, 1, XGoogSpannerRequestIdTest.NON_DETERMINISTIC, 1)),
5449+
new XGoogSpannerRequestId(NON_DETERMINISTIC, 1, NON_DETERMINISTIC, 1)),
53925450
};
53935451
xGoogReqIdInterceptor.checkExpectedUnaryXGoogRequestIds(wantUnaryValues);
53945452

0 commit comments

Comments
 (0)