From 0c304b18636dd1522c7cb7ad010f16c524524744 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 24 Apr 2019 16:05:08 -0700 Subject: [PATCH] interop-testing: remove Truth method named() --- .../io/grpc/testing/integration/AbstractInteropTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java index 8b20414883..7eaff6b4f6 100644 --- a/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java +++ b/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java @@ -17,6 +17,7 @@ package io.grpc.testing.integration; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; import static io.opencensus.tags.unsafe.ContextUtils.TAG_CONTEXT_KEY; import static io.opencensus.trace.unsafe.ContextUtils.CONTEXT_SPAN_KEY; @@ -1226,7 +1227,7 @@ public abstract class AbstractInteropTest { fail(); } catch (StatusRuntimeException ex) { Status s = ex.getStatus(); - assertThat(s.getCode()).named(s.toString()).isEqualTo(Status.Code.RESOURCE_EXHAUSTED); + assertWithMessage(s.toString()).that(s.getCode()).isEqualTo(Status.Code.RESOURCE_EXHAUSTED); assertThat(Throwables.getStackTraceAsString(ex)).contains("exceeds maximum"); } } @@ -1282,7 +1283,7 @@ public abstract class AbstractInteropTest { fail(); } catch (StatusRuntimeException ex) { Status s = ex.getStatus(); - assertThat(s.getCode()).named(s.toString()).isEqualTo(Status.Code.CANCELLED); + assertWithMessage(s.toString()).that(s.getCode()).isEqualTo(Status.Code.CANCELLED); assertThat(Throwables.getStackTraceAsString(ex)).contains("message too large"); } }