4242import io .grpc .ConnectivityStateInfo ;
4343import io .grpc .EquivalentAddressGroup ;
4444import io .grpc .ForwardingChannelBuilder2 ;
45+ import io .grpc .Grpc ;
4546import io .grpc .InternalManagedChannelBuilder ;
4647import io .grpc .LoadBalancer .CreateSubchannelArgs ;
4748import 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