Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve
PantsRunnerTest
setup error message.
This is in support of debugging OSX CI failures under Jenkins but is also generally more friendly. Testing Done: Verified the capture code worked with: ```diff $ git diff -U1 diff --git a/tests/java/org/pantsbuild/tools/runner/PantsRunnerTest.java b/tests/java/org/pantsbuild/tools/runner/PantsRunnerTest.java index 864f096..271c4ab 100644 --- a/tests/java/org/pantsbuild/tools/runner/PantsRunnerTest.java +++ b/tests/java/org/pantsbuild/tools/runner/PantsRunnerTest.java @@ -83,3 +83,3 @@ public class PantsRunnerTest { stderr.readAll()), - 0, + 42, result); ``` Yielding: ``` $ ./pants test tests/java/org/pantsbuild/tools/runner:jar ... 16:00:23 00:03 [junit] 16:00:23 00:03 [run] OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 OpenJDK 64-Bit Server VM warning: ignoring option UseSplitVerifier; support was removed in 8.0 Auto-detected 8 processors, using -parallel-threads=8 F Time: 3.73 There was 1 failure: 1) org.pantsbuild.tools.runner.PantsRunnerTest java.lang.AssertionError: Problem running ./pants bundle testprojects/src/java/org/pantsbuild/testproject/runner:pants-runner-testproject - exited with 0: STDOUT: 16:00:26 00:00 [main] (To run a reporting server: ./pants server) 16:00:26 00:00 [setup] 16:00:26 00:00 [parse] Executing tasks in goals: bootstrap -> imports -> unpack-jars -> deferred-sources -> gen -> jvm-platform-validate -> resolve -> resources -> compile -> binary -> apk -> sign -> bundle 16:00:26 00:00 [bootstrap] 16:00:26 00:00 [substitute-aliased-targets] 16:00:26 00:00 [jar-dependency-management] 16:00:26 00:00 [bootstrap-jvm-tools] 16:00:26 00:00 [provide-tools-jar] ... 16:00:27 00:01 [complete] SUCCESS STDERR: expected:<42> but was:<0> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.pantsbuild.tools.runner.PantsRunnerTest.setUpClass(PantsRunnerTest.java:77) ... ``` CI went green here: http://jenkins.pantsbuild.org/job/pantsbuild/job/pants/job/PR-3616/10/ Bugs closed: 3615, 3616 Reviewed at https://rbcommons.com/s/twitter/r/4038/
- Loading branch information