Stop test execution after first failure (#4190)
* Rough pass at stopNow() on test failure
* Updated worker TestClassProcessor.stopNow() to throw UnsupportedOperationException
* Updated MaxNParallelTestClassProcessor to keep "raw" processors for stopNow().
Updated other daemon-side TestClassProcessors to keep track if stopNow() is called.
* Added AbstractTestTask.getFailFast()
* Added some unit tests for to TestClassProcessors
* Added unit tests for stopNow()
* Rough pass at JUnitFailFastIntegrationTest
* Refactor fail fast JVM integration test.
Moved common logic/tests from JUnitFailFastIntegrationTest into AbstractJvmFailFastIntegrationSpec.
Added TestNGFailFastIntegrationTest (which extends TestNGFailFastIntegrationTest)
* Working on forkEvery fail fast test
* Converted FailFastTestListener to FailFastTestListenerInternal
* Added BlockingHttpServer.expectMaybeAndBlock()
* TestNG parallel & fail-fast integration test
* Remove unused import
* Remove unused import
* Marked test.failFast as @Input
* Added `failFast` to java_plugin in userguide
* Javadoc & formatting changes
* Updated userguide docs based on review comments
* Moved `failFast` configuration from `AbstractTestTask` to `Test` to avoid `XCTest`
* Updates from review comments
* More updates from review comments
* Reduced Mock() usage in FailFastTestListenerInternalTest
* Backed out changes to XCTestExecuter for fail fast behavior
* Fixed typo in javadoc
* Remove --no-fail-fast `@Option` from `Test`
* Reduce mocking expectations in ForkingTestClassProcessorTest
* Moved @Internal from Test.getFailFast() to AbstractTestTask
* Formatting updates
* Updated ForkingTestClassProcessor to track state more precisely to avoid stop() & stopNow() problem
* Fixed tests (again)
* Better handling of mutual exclusion between ForkingTestClassProcessor stop() and stopNow() sections
* Improved resiliency to indeterminate generated test class execution in fail fast tests
* Optimized imports
* Updated DefaultWorkerProcess.cleanup() to stop the Stoppables before aborting the execHandle
* Changed CyclicBarrierAnyOfRequestHandler.expected back to `private`
* ForkingTestClassProcessor.stoppedNow does not need to be `volatile` as it is now protected by a lock
* Added JUnitPlatformTestClassProcessor.stopNow()
* Removed mention of --no-fail-fast from user guide
* Added info on --fail-fast to release notes
* Fixed use of `testOmitted` in AbstractJvmFailFastIntegrationSpec
* Make MaxNParallelTestClassProcessor drop any processTestClass() invocations after stopNow()
* Protected critical region in ForkingTestClassProcessor.processTestClass() causing race condition with stopNow() in tests
* Debugging cleanup