Skip to content

Commit

Permalink
Improve an assertion message.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 480893819
Change-Id: Ied30b6d6b9c2bf3bfcb76a003d6e8010f9a01474
  • Loading branch information
tjgq authored and copybara-github committed Oct 13, 2022
1 parent bdcd65d commit b682d63
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -394,7 +395,10 @@ public List<CachedActionEvent> 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();
}
}

Expand Down

0 comments on commit b682d63

Please sign in to comment.