From 80c02ab5b4ecd67096abc6623a93afe19c96780f Mon Sep 17 00:00:00 2001 From: Solomon Duskis Date: Thu, 28 Feb 2019 20:17:07 -0500 Subject: [PATCH] Using the latest version of truth (#4597) * Using a much newer version of truth * Upgrading annotations in google-api-grpc --- google-api-grpc/pom.xml | 2 +- google-cloud-clients/google-cloud-core/pom.xml | 5 +++++ .../com/google/cloud/spanner/GrpcResultSetTest.java | 5 ++++- .../java/com/google/cloud/spanner/ResultSetsTest.java | 7 +++++-- google-cloud-clients/pom.xml | 11 ++++++++--- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index ad2919050be3..2cff2dc517b7 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -93,7 +93,7 @@ javax.annotation javax.annotation-api - 1.2 + 1.3.2 compile diff --git a/google-cloud-clients/google-cloud-core/pom.xml b/google-cloud-clients/google-cloud-core/pom.xml index b11f39571e03..7955886b154c 100644 --- a/google-cloud-clients/google-cloud-core/pom.xml +++ b/google-cloud-clients/google-cloud-core/pom.xml @@ -81,5 +81,10 @@ guava-testlib test + + org.checkerframework + checker-compat-qual + test + diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java index 63a8e792f709..6b88e72e44c1 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java @@ -762,7 +762,10 @@ public void getDoubleArray() { consumer.onCompleted(); assertThat(resultSet.next()).isTrue(); - assertThat(resultSet.getDoubleArray(0)).isEqualTo(doubleArray, 0.0); + assertThat(resultSet.getDoubleArray(0)) + .usingTolerance(0.0) + .containsExactly(doubleArray) + .inOrder(); } @Test diff --git a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsTest.java b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsTest.java index 6bfb6c9e4308..dc6892fed26d 100644 --- a/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsTest.java +++ b/google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/ResultSetsTest.java @@ -192,8 +192,11 @@ public void resultSetIteration() { assertThat(rs.getLongArray("longArray")).isEqualTo(longArray); assertThat(rs.getLongList(9)).isEqualTo(Longs.asList(longArray)); assertThat(rs.getLongList("longArray")).isEqualTo(Longs.asList(longArray)); - assertThat(rs.getDoubleArray(10)).isEqualTo(doubleArray, 0.0); - assertThat(rs.getDoubleArray("doubleArray")).isEqualTo(doubleArray, 0.0); + assertThat(rs.getDoubleArray(10)).usingTolerance(0.0).containsAllOf(doubleArray); + assertThat(rs.getDoubleArray("doubleArray")) + .usingTolerance(0.0) + .containsExactly(doubleArray) + .inOrder(); assertThat(rs.getDoubleList(10)).isEqualTo(Doubles.asList(doubleArray)); assertThat(rs.getDoubleList("doubleArray")).isEqualTo(Doubles.asList(doubleArray)); assertThat(rs.getBytesList(11)).isEqualTo(Arrays.asList(byteArray)); diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index 35a6cf4d1ea8..5b2895d34d1d 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -175,7 +175,7 @@ javax.annotation javax.annotation-api - 1.2 + 1.3.2 compile @@ -381,7 +381,7 @@ com.google.errorprone error_prone_annotations - 2.2.0 + 2.3.2 org.easymock @@ -407,7 +407,12 @@ com.google.truth truth - 0.30 + 0.42 + + + org.checkerframework + checker-compat-qual + 2.5.3