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

Commit 53b4b24

Browse files
chore: generate libraries at Mon Feb 2 23:09:09 UTC 2026
1 parent 780537e commit 53b4b24

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/metrics/BuiltinMetricsTracerTest.java

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,7 @@ public void sendHeaders(Metadata headers) {
281281
if (oldConfigurator != null) {
282282
builder = oldConfigurator.apply(builder);
283283
}
284-
return builder
285-
.proxyDetector(delayProxyDetector)
286-
.intercept(outstandingRpcCounter);
284+
return builder.proxyDetector(delayProxyDetector).intercept(outstandingRpcCounter);
287285
});
288286
stubSettingsBuilder.setTransportChannelProvider(channelProvider.build());
289287
EnhancedBigtableStubSettings stubSettings = stubSettingsBuilder.build();
@@ -1141,34 +1139,41 @@ static class OutstandingRpcCounter implements ClientInterceptor {
11411139
private final Object lock = new Object();
11421140

11431141
@Override
1144-
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(MethodDescriptor<ReqT, RespT> methodDescriptor, CallOptions callOptions, Channel channel) {
1142+
public <ReqT, RespT> ClientCall<ReqT, RespT> interceptCall(
1143+
MethodDescriptor<ReqT, RespT> methodDescriptor, CallOptions callOptions, Channel channel) {
11451144
synchronized (lock) {
11461145
numOutstandingRpcs++;
11471146
}
1148-
return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(channel.newCall(methodDescriptor, callOptions)) {
1147+
return new ForwardingClientCall.SimpleForwardingClientCall<ReqT, RespT>(
1148+
channel.newCall(methodDescriptor, callOptions)) {
11491149
@Override
11501150
public void start(Listener<RespT> responseListener, Metadata headers) {
1151-
super.start(new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(responseListener) {
1152-
@Override
1153-
public void onClose(Status status, Metadata trailers) {
1154-
super.onClose(status, trailers);
1155-
synchronized (lock) {
1156-
numOutstandingRpcs--;
1157-
lock.notify();
1158-
}
1159-
}
1160-
}, headers);
1151+
super.start(
1152+
new ForwardingClientCallListener.SimpleForwardingClientCallListener<RespT>(
1153+
responseListener) {
1154+
@Override
1155+
public void onClose(Status status, Metadata trailers) {
1156+
super.onClose(status, trailers);
1157+
synchronized (lock) {
1158+
numOutstandingRpcs--;
1159+
lock.notify();
1160+
}
1161+
}
1162+
},
1163+
headers);
11611164
}
11621165
};
11631166
}
1167+
11641168
void waitUntilRpcsDone() throws InterruptedException {
11651169
synchronized (lock) {
1166-
while(numOutstandingRpcs > 0) {
1170+
while (numOutstandingRpcs > 0) {
11671171
lock.wait();
11681172
}
11691173
}
11701174
}
11711175
}
1176+
11721177
class DelayProxyDetector implements ProxyDetector {
11731178
private volatile Instant lastProxyDelay = null;
11741179

0 commit comments

Comments
 (0)