Skip to content

Commit aa30a7f

Browse files
committed
Add a test for RLS, too
1 parent 451b38c commit aa30a7f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

rls/src/test/java/io/grpc/rls/RlsLoadBalancerTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import io.grpc.ConnectivityStateInfo;
4343
import io.grpc.EquivalentAddressGroup;
4444
import io.grpc.ForwardingChannelBuilder2;
45+
import io.grpc.Grpc;
4546
import io.grpc.InternalManagedChannelBuilder;
4647
import io.grpc.LoadBalancer.CreateSubchannelArgs;
4748
import io.grpc.LoadBalancer.Helper;
@@ -371,8 +372,10 @@ public void metricsWithRealChannel() throws Exception {
371372
.build());
372373

373374
StreamRecorder<Void> recorder = StreamRecorder.create();
375+
CallOptions callOptions = CallOptions.DEFAULT
376+
.withOption(Grpc.CALL_OPTION_CUSTOM_LABEL, "customvalue");
374377
StreamObserver<Void> requestObserver = ClientCalls.asyncClientStreamingCall(
375-
channel.newCall(fakeSearchMethod, CallOptions.DEFAULT), recorder);
378+
channel.newCall(fakeSearchMethod, callOptions), recorder);
376379
requestObserver.onCompleted();
377380
assertThat(recorder.awaitCompletion(10, TimeUnit.SECONDS)).isTrue();
378381
assertThat(recorder.getError()).isNull();
@@ -382,7 +385,7 @@ public void metricsWithRealChannel() throws Exception {
382385
eq(1L),
383386
eq(Arrays.asList("directaddress:///fake-bigtable.googleapis.com", "localhost:8972",
384387
"defaultTarget", "complete")),
385-
eq(Arrays.asList("")));
388+
eq(Arrays.asList("customvalue")));
386389
}
387390

388391
@Test

0 commit comments

Comments
 (0)