Fix JUnit -fail-fast, add test for early exit hook and remove unused code

Review Request #4081 - Created July 14, 2016 and submitted

Information
Chris Heisterkamp
pants
junit-fail-fast-et-al
3672
Reviewers
pants-reviews
stuhood, zundel

Replace AbortableListner with ShutdownListener because the AbortableListener did not work with -fail-fast but we still want to keep the functionality of displaying a test summary if the tests are shutdown unexpectedly and add an integration test for the ShutdownListener.

Remove ForwardingListener and ListenerRegistry because they were only being used by the AbortableListener but also had a bug when one listener threw an exception none of the rest of the listeners would get executed. An example of this is what caused the need for https://rbcommons.com/s/twitter/r/4060/

Instead of the fix from https://rbcommons.com/s/twitter/r/4060/, move the testRunFinishFailed test to JUnitConsoleImplTest.java where we can more easily test the output and fix the problem in the ConsoleListener instead.

Add a FailFastListener and FailFastRunner so -fail-fast returns a better test summary and add a test for it.

Remove exitStatus from ConsoleRunnerImpl because it is unused and fix some typos and deprecation warnings in related JUnitConsole classes.

Move the output mode tests from integration tests to the ConsoleRunnerImpl because they can be unit tested instead of using the full integration setup.

Add test for -per-test-timer

Travis CI: https://travis-ci.org/pantsbuild/pants/builds/145736212

Stu Hood
Eric Ayers
Eric Ayers
Chris Heisterkamp
Eric Ayers
Stu Hood
Chris Heisterkamp
Stu Hood
Chris Heisterkamp
Review request changed

Status: Closed (submitted)

Change Summary:

Merged as f1c708e0dc4b9780fbcc34d18611247e20f7c55d

Loading...