File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -240,22 +240,18 @@ void testHttpJsonCompliance_userApiVersionSetSuccess() throws IOException {
240240
241241 @ Test
242242 void testGrpcCall_sendsCorrectApiClientHeader () {
243- Pattern defautlGrpcHeaderPattern =
244- Pattern .compile ("gl-java/.* gapic/.*?--protobuf-\\ d.* gax/.* grpc/.* protobuf/\\ d.*" );
245243 grpcClient .echo (EchoRequest .newBuilder ().build ());
246244 String headerValue = grpcInterceptor .metadata .get (API_CLIENT_HEADER_KEY );
247- assertTrue (defautlGrpcHeaderPattern .matcher (headerValue ).matches ());
245+ assertTrue (GaxHttpJsonProperties . getDefaultApiClientHeaderPattern () .matcher (headerValue ).matches ());
248246 }
249247
250248 @ Test
251249 void testHttpJson_sendsCorrectApiClientHeader () {
252- Pattern defautlHttpHeaderPattern =
253- Pattern .compile ("gl-java/.* gapic/.*?--protobuf-\\ d.* gax/.* rest/ protobuf/\\ d.*" );
254250 httpJsonClient .echo (EchoRequest .newBuilder ().build ());
255251 ArrayList <String > headerValues =
256252 (ArrayList <String >)
257253 httpJsonInterceptor .metadata .getHeaders ().get (HTTP_CLIENT_API_HEADER_KEY );
258254 String headerValue = headerValues .get (0 );
259- assertTrue (defautlHttpHeaderPattern .matcher (headerValue ).matches ());
255+ assertTrue (GaxHttpJsonProperties . getDefaultApiClientHeaderPattern () .matcher (headerValue ).matches ());
260256 }
261257}
You can’t perform that action at this time.
0 commit comments