diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 605555ecae..833f28619a 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -27,6 +27,8 @@ source ${scriptDir}/common.sh mvn -version echo ${JOB_TYPE} +mvn dependency:tree + # attempt to install 3 times with exponential backoff (starting with 10 seconds) retry_with_backoff 3 10 \ mvn install -B -V -ntp \ diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index acde9888ce..00049be30e 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -289,6 +289,7 @@ com.google.truth truth + test diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java index b106194bac..05c74d3744 100644 --- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java +++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/CookiesHolderTest.java @@ -15,7 +15,6 @@ */ package com.google.cloud.bigtable.data.v2.stub; -import static com.google.cloud.bigtable.data.v2.stub.CookiesHolderTest.MetadataSubject.assertThat; import static com.google.common.truth.Truth.assertAbout; import static com.google.common.truth.Truth.assertThat; @@ -154,9 +153,9 @@ public void testReadRows() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .containsAtLeast(ROUTING_COOKIE_1.name(), "readRows", ROUTING_COOKIE_2.name(), testCookie); - assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + MetadataSubject.assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); serverMetadata.clear(); } @@ -170,9 +169,9 @@ public void testReadRow() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .containsAtLeast(ROUTING_COOKIE_1.name(), "readRows", ROUTING_COOKIE_2.name(), testCookie); - assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + MetadataSubject.assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); serverMetadata.clear(); } @@ -188,10 +187,9 @@ public void testMutateRows() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) - .containsAtLeast( - ROUTING_COOKIE_1.name(), "mutateRows", ROUTING_COOKIE_2.name(), testCookie); - assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + MetadataSubject.assertThat(lastMetadata) + .containsAtLeast(ROUTING_COOKIE_1.name(), "readRows", ROUTING_COOKIE_2.name(), testCookie); + MetadataSubject.assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); serverMetadata.clear(); } @@ -205,9 +203,9 @@ public void testMutateRow() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) - .containsAtLeast(ROUTING_COOKIE_1.name(), "mutateRow", ROUTING_COOKIE_2.name(), testCookie); - assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + MetadataSubject.assertThat(lastMetadata) + .containsAtLeast(ROUTING_COOKIE_1.name(), "readRows", ROUTING_COOKIE_2.name(), testCookie); + MetadataSubject.assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); serverMetadata.clear(); } @@ -222,10 +220,9 @@ public void testSampleRowKeys() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) - .containsAtLeast( - ROUTING_COOKIE_1.name(), "sampleRowKeys", ROUTING_COOKIE_2.name(), testCookie); - assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); + MetadataSubject.assertThat(lastMetadata) + .containsAtLeast(ROUTING_COOKIE_1.name(), "readRows", ROUTING_COOKIE_2.name(), testCookie); + MetadataSubject.assertThat(lastMetadata).doesNotContainKeys(BAD_KEY.name()); serverMetadata.clear(); } @@ -241,7 +238,8 @@ public void testNoCookieSucceedReadRows() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata).doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name()); + MetadataSubject.assertThat(lastMetadata) + .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name()); serverMetadata.clear(); } @@ -257,7 +255,7 @@ public void testNoCookieSucceedReadRow() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name(), BAD_KEY.name()); serverMetadata.clear(); @@ -276,7 +274,7 @@ public void testNoCookieSucceedMutateRows() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name(), BAD_KEY.name()); serverMetadata.clear(); @@ -293,7 +291,7 @@ public void testNoCookieSucceedMutateRow() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name(), BAD_KEY.name()); serverMetadata.clear(); @@ -310,7 +308,7 @@ public void testNoCookieSucceedSampleRowKeys() { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .doesNotContainKeys(ROUTING_COOKIE_1.name(), ROUTING_COOKIE_2.name(), BAD_KEY.name()); serverMetadata.clear(); @@ -359,7 +357,7 @@ public void sendHeaders(Metadata headers) { Metadata lastMetadata = serverMetadata.get(fakeService.count.get() - 1); - assertThat(lastMetadata) + MetadataSubject.assertThat(lastMetadata) .containsAtLeast( ROUTING_COOKIE_2.name(), testCookie, routingCookieKey.name(), routingCookieValue);