From b682d632694601bb6c78ff390d02053578e51921 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 13 Oct 2022 08:08:05 -0700 Subject: [PATCH] Improve an assertion message. PiperOrigin-RevId: 480893819 Change-Id: Ied30b6d6b9c2bf3bfcb76a003d6e8010f9a01474 --- .../lib/remote/BuildWithoutTheBytesIntegrationTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java index d36ab2713919c0..0344d476db39f4 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/BuildWithoutTheBytesIntegrationTest.java @@ -16,6 +16,7 @@ import static com.google.common.base.Preconditions.checkState; import static com.google.common.collect.Iterables.getOnlyElement; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import static com.google.devtools.build.lib.remote.util.IntegrationTestUtils.startWorker; import static com.google.devtools.build.lib.vfs.FileSystemUtils.readContent; import static java.nio.charset.StandardCharsets.UTF_8; @@ -394,7 +395,10 @@ public List getCachedActionEvents() { private void assertOutputsDoNotExist(String target) throws Exception { for (Artifact output : getArtifacts(target)) { - assertThat(output.getPath().exists()).isFalse(); + assertWithMessage( + "output %s for target %s should not exist", output.getExecPathString(), target) + .that(output.getPath().exists()) + .isFalse(); } }