ForkingTestClassProcessorTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix test

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
Keep pineapple as a WORKER module

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 3 more files in changeset.
Revert "Add pineapple to worker classpath"

This reverts commit 500d2e6f28792688f6d7bb472a706d2e49ad2f7e.

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 3 more files in changeset.
Add pineapple to worker classpath

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 3 more files in changeset.
Add pineapple to worker classpath

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 4 more files in changeset.
Fix test

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
Fix tests

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 3 more files in changeset.
Fix tests

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  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

    • -6
    • +49
    ./ForkingTestClassProcessorTest.groovy
  1. … 41 more files in changeset.
Fix failed tests

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
Fix failures on CI

    • -3
    • +3
    ./ForkingTestClassProcessorTest.groovy
  1. … 13 more files in changeset.
Add --warning to suppress deprecation warnings (#3726)

Signed-off-by: Bo Zhang <bo@gradle.com>

    • -1
    • +3
    ./ForkingTestClassProcessorTest.groovy
  1. … 31 more files in changeset.
Catch AccessControlException to avoid test worker process hanging

Partially fix https://github.com/gradle/gradle/issues/3526

If a security manager is set in test, test worker process can no longer

react to message from main process because Gradle's message dispatch mechanism

depends on reflection and socket communication. This PR fix the issue which cause

worker process to hang and provide more readable error messages

Signed-off-by: Bo Zhang <bo@gradle.com>

    • -1
    • +3
    ./ForkingTestClassProcessorTest.groovy
  1. … 6 more files in changeset.
Extract :core-api project (#2719)

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 785 more files in changeset.
Acquire worker lease per test worker, not per test class

This reverts a change that put the worker lease around the processTestClass call. That change had two negative effects:

- it was no longer protecting the actual work in the test worker, but only the "work" of sending the test class over (which is cheap)

- it acquired and released a worker lease for every test class, leading to lots of contention with other threads waiting on that lock

The original change was made in response to a deadlock which was probably caused by something else.

The test cases are still all passing and the large performance test project that used to show the deadlock is no longer having that problem.

    • -1
    • +4
    ./ForkingTestClassProcessorTest.groovy
  1. … 3 more files in changeset.
Remove version-info.jar

+review REVIEW-6527

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 13 more files in changeset.
Don't use native services in test workers

    • -0
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 1 more file in changeset.
Remove guava from worker process path

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 15 more files in changeset.
Fix potential deadlock on parallel test execution

Could happen with certain combinations of maxWorkers/maxParallelForks

and forkEvery. One of our performance tests started to exhibit the

deadlock in a reproducible manner in a feature branch.

This commits fix the potential deadlock caused by a bad handling of

forkEvery wrt. worker leases management in ForkingTestClassProcessor.

The worker lease management responsibility is moved to a dedicated

TestClassProcessor, simpler to understand.

    • -7
    • +1
    ./ForkingTestClassProcessorTest.groovy
  1. … 4 more files in changeset.
Introduce a resource lock coordination service

- convert worker leases to resource locks

- atomically lock project and worker lease when selecting a task to execute

- change task execution plan to lock around resource lock state

    • -0
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 75 more files in changeset.
Introduce a resource lock coordination service

- convert worker leases to resource locks

- atomically lock project and worker lease when selecting a task to execute

- change task execution plan to lock around resource lock state

    • -0
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 76 more files in changeset.
First stab at worker processes providing jvm memory information

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 32 more files in changeset.
Extract build receipt into own jar

Instead of including the build receipt into

the core jar we add it to an own jar - version-info.

The build receipt often contains a timestamp and therefore

we want to use it as little as possible.

By doing this we keep the classpath constant between

builds and therefore allow for more caching.

We also have to add the version-info to the Gradle Worker process.

This makes it possible to evaluate the `GradleVersion`

in those, too. If one wants to log deprecation messages

from there this is necessary. For example`JULRedirectorIntegrationTest.defaultLoggingConfigNoFineLevelWhenDisabled`

fails without this.

PR #805

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 10 more files in changeset.
Apply a single max-workers limit to both task worker threads and test worker processes, so that no more than `max-workers` tasks and test processes combined may run at the same time.

Each test task will run 1 test worker process regardless of what else is running concurrently. For any more than 1 test worker process, the task waits until there is available capacity before starting the worker.

Changed the contract of `BuildOperationWorkerRegistry` to allow nesting of operations and association across threads. Changed `AbstractTaskPlanExecutor` to use this service

    • -3
    • +3
    ./ForkingTestClassProcessorTest.groovy
  1. … 14 more files in changeset.
Apply max-workers setting to test workers, so that no more than `max-workers` test workers may run concurrently.

This cap applies to all test workers regardless of which test task they are started by and so applies across test workers for test tasks that are running concurrently. The cap applies regardless of the `maxParallelForks` setting of each particular test task.

Note that the cap is currently separate from the caps applied to tasks and other build operations. This will later be changed so that a single cap applies to all such work.

    • -3
    • +8
    ./ForkingTestClassProcessorTest.groovy
  1. … 9 more files in changeset.
Moved the public logging API classes from `core` to new `logging` project.

    • -2
    • +2
    ./ForkingTestClassProcessorTest.groovy
  1. … 23 more files in changeset.
Fixed broken import.

    • -1
    • +1
    ./ForkingTestClassProcessorTest.groovy
Merge remote-tracking branch 'origin/release'

    • -1
    • +36
    ./ForkingTestClassProcessorTest.groovy
  1. … 5 more files in changeset.
Cleaning up unit test conditions

+review REVIEW-5898

    • -5
    • +5
    ./ForkingTestClassProcessorTest.groovy
Polishing limited test worker classpath

+review REVIEW-5898

    • -1
    • +35
    ./ForkingTestClassProcessorTest.groovy
  1. … 1 more file in changeset.