ParallelTestExecutionIntegrationTest.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Let testing-jvm tests not use deprecated configurations

    • -4
    • +4
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 76 more files in changeset.
Let testing-jvm tests not use deprecated configurations

    • -4
    • +4
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 76 more files in changeset.
Let testing-jvm tests not use deprecated configurations

    • -4
    • +4
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 76 more files in changeset.
Let testing-jvm tests not use deprecated configurations

    • -4
    • +4
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 76 more files in changeset.
Set timeout for AbstractIntegrationSpec (#5806)

We have been bitten by CI build exection timeout for a long time.

This PR introduces timeout for AbstractIntegrationSpec in order to

monitor execution timeout. Upon timeout, a spock interceptor can

print all threads' stack traces in all JVMs so that we can diagnose

the potential issues in other JVMs (daemons, test workers, etc.).

    • -2
    • +2
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 29 more files in changeset.
Scan for both JUnit 4 and 5 classes

    • -2
    • +6
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 49 more files in changeset.
On CI redirect jcenter queries to local repo for integration tests

    • -2
    • +2
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 51 more files in changeset.
Hotfix deadlock in parallel test execution

For each test task we create `maxParallelForks` actors

which receive test classes in a round-robin fashion. These

actors then acquire a worker lease and send the tests to the

actual test process for execution. The problem is that these

actors have a limited queue, so if one of them fails to acquire

a worker lease, then the whole test task comes to a halt, because

the actor blocks the round-robin loop. This can then deadlock

the whole build if there are more test tasks than maximum workers.

This hotfix for Gradle 4.0 just raises the queue size of the actors,

so they won't block the round-robin loop for any realistically-sized project.

The real fix would be to acquire a worker lease *before* we create a new

actor. This will be a follup-up change for 4.1.

    • -5
    • +42
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 1 more file in changeset.
Hotfix deadlock in parallel test execution

For each test task we create `maxParallelForks` actors

which receive test classes in a round-robin fashion. These

actors then acquire a worker lease and send the tests to the

actual test process for execution. The problem is that these

actors have a limited queue, so if one of them fails to acquire

a worker lease, then the whole test task comes to a halt, because

the actor blocks the round-robin loop. This can then deadlock

the whole build if there are more test tasks than maximum workers.

This hotfix for Gradle 4.0 just raises the queue size of the actors,

so they won't block the round-robin loop for any realistically-sized project.

The real fix would be to acquire a worker lease *before* we create a new

actor. This will be a follup-up change for 4.1.

    • -5
    • +42
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 1 more file in changeset.
Tweaked the API of `BlockingHttpServer` to make it somewhat more convenient to use in tests.

    • -1
    • +1
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 15 more files in changeset.
Added some trace to int test.

    • -1
    • +1
    ./ParallelTestExecutionIntegrationTest.groovy
Some fixes for timeout in int test: switched to using Java for unit tests in the test build, and compile everything prior to starting the test build.

    • -8
    • +10
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 8 more files in changeset.
Changed a couple of tests to use convenience method to inject calls to `BlockingHttpServer` into test builds instead of hard-coding the URL, and to pick up the diagnostics that is also injected into the test builds.

    • -2
    • +1
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 1 more file in changeset.
Some changes to `BlockingHttpServer`: fix `release()` to work when fewer than the expected max concurrent requests are still expected, moved timeout from parameter of `waitForAllPendingCalls()` to constructor parameter, added some test coverage.

    • -3
    • +3
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 7 more files in changeset.
Increase timeouts in parallel test execution test

    • -4
    • +4
    ./ParallelTestExecutionIntegrationTest.groovy
Refine ParallelTestExecutionIntegrationTest

The forkEvery value didn’t make sense for some maxWorkers/maxParallelForks values under test

Shouldn’t be flaky anymore

Exercise more potential deadlock situations, see the two previous commits

    • -14
    • +6
    ./ParallelTestExecutionIntegrationTest.groovy
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.

    • -0
    • +131
    ./ParallelTestExecutionIntegrationTest.groovy
  1. … 4 more files in changeset.