From 409afe5867b49a71d02047feaf7c0a90c63834f3 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Tue, 4 Jun 2019 21:12:21 -0700 Subject: [PATCH] all: update to truth 0.45 --- android-interop-testing/app/build.gradle | 2 +- android/build.gradle | 2 +- build.gradle | 2 +- .../src/test/java/io/grpc/testing/DeadlineSubject.java | 10 ++++------ examples/android/clientcache/app/build.gradle | 2 +- repositories.bzl | 4 ++-- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/android-interop-testing/app/build.gradle b/android-interop-testing/app/build.gradle index 0130593579..ea2d7916cd 100644 --- a/android-interop-testing/app/build.gradle +++ b/android-interop-testing/app/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation ('com.google.auth:google-auth-library-oauth2-http:0.9.0') { exclude group: 'org.apache.httpcomponents', module: 'httpclient' } - implementation 'com.google.truth:truth:0.44' + implementation 'com.google.truth:truth:0.45' implementation 'javax.annotation:javax.annotation-api:1.2' implementation 'junit:junit:4.12' diff --git a/android/build.gradle b/android/build.gradle index d270c3f050..cdc83539a4 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -51,7 +51,7 @@ dependencies { testImplementation 'io.grpc:grpc-okhttp:1.22.0-SNAPSHOT' // CURRENT_GRPC_VERSION testImplementation 'junit:junit:4.12' testImplementation 'org.robolectric:robolectric:3.7.1' - testImplementation 'com.google.truth:truth:0.44' + testImplementation 'com.google.truth:truth:0.45' } signing { diff --git a/build.gradle b/build.gradle index d2a54fc3ae..b1e61fd347 100644 --- a/build.gradle +++ b/build.gradle @@ -229,7 +229,7 @@ subprojects { // Test dependencies. junit: 'junit:junit:4.12', mockito: 'org.mockito:mockito-core:2.25.1', - truth: 'com.google.truth:truth:0.44', + truth: 'com.google.truth:truth:0.45', guava_testlib: "com.google.guava:guava-testlib:${guavaVersion}", // Benchmark dependencies diff --git a/context/src/test/java/io/grpc/testing/DeadlineSubject.java b/context/src/test/java/io/grpc/testing/DeadlineSubject.java index 47cd556027..b443f3c088 100644 --- a/context/src/test/java/io/grpc/testing/DeadlineSubject.java +++ b/context/src/test/java/io/grpc/testing/DeadlineSubject.java @@ -17,8 +17,7 @@ package io.grpc.testing; import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.Strings.lenientFormat; -import static com.google.common.truth.Fact.simpleFact; +import static com.google.common.truth.Fact.fact; import static java.util.concurrent.TimeUnit.NANOSECONDS; import com.google.common.truth.ComparableSubject; @@ -66,10 +65,9 @@ public final class DeadlineSubject extends ComparableSubject 0) { failWithoutActual( - simpleFact( - lenientFormat( - "%s and <%s> should have been within <%sns> of each other", - actualAsString(), expected, deltaNanos))); + fact("expected", expected), + fact("but was", actual), + fact("outside tolerance in ns", deltaNanos)); } } }; diff --git a/examples/android/clientcache/app/build.gradle b/examples/android/clientcache/app/build.gradle index f956e2cfd5..e06a1f5c58 100644 --- a/examples/android/clientcache/app/build.gradle +++ b/examples/android/clientcache/app/build.gradle @@ -55,6 +55,6 @@ dependencies { implementation 'javax.annotation:javax.annotation-api:1.2' testImplementation 'junit:junit:4.12' - testImplementation 'com.google.truth:truth:0.44' + testImplementation 'com.google.truth:truth:0.45' testImplementation 'io.grpc:grpc-testing:1.22.0-SNAPSHOT' // CURRENT_GRPC_VERSION } diff --git a/repositories.bzl b/repositories.bzl index 9bbd31eb7e..ddcc9c3f83 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -253,9 +253,9 @@ def com_google_protobuf_javalite(): def com_google_truth_truth(): jvm_maven_import_external( name = "com_google_truth_truth", - artifact = "com.google.truth:truth:0.44", + artifact = "com.google.truth:truth:0.45", server_urls = ["http://central.maven.org/maven2"], - artifact_sha256 = "a9e6796786c9c77a5fe19b08e72fe0a620d53166df423d8861af9ebef4dc4247", + artifact_sha256 = "0f7dced2a16e55a77e44fc3ff9c5be98d4bf4bb30abc18d78ffd735df950a69f", licenses = ["notice"], # Apache 2.0 )