Clone Tools
  • last updated a few seconds ago
Constraints: committers
Constraints: files
Constraints: dates
Handle exceptions in JUnit 5 test engine initialization

This fixes https://github.com/gradle/gradle/issues/4476

Previously in Gradle, test execution are class-based, which means a "TestClassStart" event will

be emitted before all test cases and a "TestClassEnd" event will be emitted after all test cases

(no matter they're failed or successful). In JUnit 5, if an exception occurs before "TestClassStart"

event (e.g. exceptions in test engine initialization), some event assertions will be violated.

In this situation, this PR will emit corresponding "TestClassStart/TestClassEnd" event to make

Gradle test event infrastructure happy.

  1. … 3 more files in changeset.
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

  1. … 41 more files in changeset.
"coordinate" -> "coordinates"

  1. … 60 more files in changeset.
Fix bugs when integrating with running Vintage engine on Spock @Unroll test

Vintage engine will trigger events with type 'TEST' for both test class

and test method, which might cause test hang unexpectedly. This PR identifies

these different test events and fixes this issue.

  1. … 1 more file in changeset.
Ignore nested class in JUnit platform test

  1. … 2 more files in changeset.
Polish PR on feedback

  1. … 13 more files in changeset.
Fix NPE when using custom test engine

  1. … 1 more file in changeset.
Polish PR on feedback

  1. … 8 more files in changeset.
Run all tests in one pass

Fix failed tests

  1. … 6 more files in changeset.
Refine release note and userguide

  1. … 22 more files in changeset.
Add filtering and tagging support

  1. … 21 more files in changeset.
Minor changes for review

  1. … 5 more files in changeset.
Scan for both JUnit 4 and 5 classes

  1. … 47 more files in changeset.
Support filtering and tagging for Jupiter

  1. … 11 more files in changeset.
Refactor to reuse GenericJUnitTestEventAdapter

  1. … 2 more files in changeset.
Polish documentation for JUnit Platform

  1. … 6 more files in changeset.
Separate apiguardian and JUnit platform

Initial support for JUnit 5

    • -0
    • +25
  1. … 42 more files in changeset.