Skip to content

Commit 14a34ad

Browse files
committed
update IT tests to ensure that a protobuf version is always getting sent
1 parent cdcc0a2 commit 14a34ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITVersionHeaders.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void testHttpJsonCompliance_userApiVersionSetSuccess() throws IOException {
241241
@Test
242242
void testGrpcCall_sendsCorrectApiClientHeader() {
243243
Pattern defautlGrpcHeaderPattern =
244-
Pattern.compile("gl-java/.* gapic/.*?--protobuf-.* gax/.* grpc/.* protobuf/.*");
244+
Pattern.compile("gl-java/.* gapic/.*?--protobuf-\\d.* gax/.* grpc/.* protobuf/\\d.*");
245245
grpcClient.echo(EchoRequest.newBuilder().build());
246246
String headerValue = grpcInterceptor.metadata.get(API_CLIENT_HEADER_KEY);
247247
assertTrue(defautlGrpcHeaderPattern.matcher(headerValue).matches());
@@ -250,7 +250,7 @@ void testGrpcCall_sendsCorrectApiClientHeader() {
250250
@Test
251251
void testHttpJson_sendsCorrectApiClientHeader() {
252252
Pattern defautlHttpHeaderPattern =
253-
Pattern.compile("gl-java/.* gapic/.*?--protobuf-.* gax/.* rest/ protobuf/.*");
253+
Pattern.compile("gl-java/.* gapic/.*?--protobuf-\\d.* gax/.* rest/ protobuf/\\d.*");
254254
httpJsonClient.echo(EchoRequest.newBuilder().build());
255255
ArrayList<String> headerValues =
256256
(ArrayList<String>)

0 commit comments

Comments
 (0)