Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Include output of all failed suites in HTML report (#11262)

Prior to this commit, only the output of the root `TestDescriptor` was

included in the HTML report even though all failed suites were included

with their exceptions.

  1. … 8 more files in changeset.
Include output of all failed suites in HTML report

Prior to this commit, only the output of the root `TestDescriptor` was

included in the HTML report even though all failed suites were included

with their exceptions.

  1. … 8 more files in changeset.
Include output of all failed suites in HTML report

Prior to this commit, only the output of the root `TestDescriptor` was

included in the HTML report even though all failed suites were included

with their exceptions.

  1. … 8 more files in changeset.
Include output of all failed suites in HTML report

Prior to this commit, only the output of the root `TestDescriptor` was

included in the HTML report even though all failed suites were included

with their exceptions.

  1. … 8 more files in changeset.
WIP

    • -0
    • +123
    ./RerunFailedTestExecuter.java
    • -0
    • +5
    ./RestartEveryNTestClassProcessor.java
    • -0
    • +5
    ./RunPreviousFailedFirstTestClassProcessor.java
  1. … 9 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 889 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 896 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 901 more files in changeset.
Remove synthetic accessors for internal private symbol references

    • -1
    • +7
    ./DefaultStandardOutputRedirector.java
  1. … 901 more files in changeset.
Add support for excluding tests via --excludeTests

Signed-off-by: Felipe Lima <felipe.lima@gmail.com>

  1. … 13 more files in changeset.
Move failure diagnostics to test report

  1. … 9 more files in changeset.
Fix NPE in RestartEveryNTestClassProcessor.stopNow() (#5145)

* Fix NPE in RestartEveryNTestClassProcessor.stopNow()

* Add test verifying RestartEveryNTestClassProcessor.stopNow() after stop() does nothing

    • -2
    • +3
    ./RestartEveryNTestClassProcessor.java
  1. … 1 more file in changeset.
Improves --tests pattern matching (#4597)

We improve test pattern matching in this PR. From this PR, the test pattern matching

rule are adjusted:

- If a pattern starts with an upper-case letter, it will be used to match simple class name

e.g 'TestClass.testMethod' can match 'TestClass.testMethod' under any package.

- Otherwise, it will be used to match full qualified name.

In both cases, wildcards are supported.

    • -0
    • +56
    ./PatternMatchTestClassProcessor.java
  1. … 12 more files in changeset.
Run previous failed test first (#4557)

Run previous failed test first

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

Before the test starts, we collect all failed test classes from the result of last test, and

send them to test worker process first - this is transparent to test infrastructure because

we didn't make any guarantee about test class execution order previously.

    • -0
    • +70
    ./RunPreviousFailedFirstTestClassProcessor.java
  1. … 8 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

    • -2
    • +17
    ./MaxNParallelTestClassProcessor.java
    • -2
    • +15
    ./RestartEveryNTestClassProcessor.java
  1. … 40 more files in changeset.
Simplify time handling internally and for build scans (#2857)

* Don't make TimeProvider Serializable.

This isn't safe and generally doesn't make sense.

* Extract and promote the concept of a build timer.

This was previously not well defined and being overlaid with the concept of when a user/tool requested something, which is not always the same thing.

* Pare down the deprecated org.gradle.util.Clock down to the minimum required.

Internal usage is replaced by a `getStartTime()` directly on BuildRequestContext.

What is left is only kept for backwards compatibility with scans.

* Rename TimeProvider to Clock.

* Move BuildExecutionTimer out of baseServices into core, and into a better package.

* Remove unused.

* Simplify the time package by merging types.

* Prevent the client's build started timestamp from being later than when the provider received the build request.

* Provide a dedicated mechanism for conveying the build start time to build scans.

* Consolidate the ways of formatting durations.

  1. … 179 more files in changeset.
Replace usages of org.gradle.api.Nullable

With javax.annotation.Nullable.

    • -2
    • +2
    ./DefaultStandardOutputRedirector.java
  1. … 459 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.

    • -56
    • +0
    ./WorkerLeaseHolderTestClassProcessor.java
  1. … 3 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.

    • -0
    • +56
    ./WorkerLeaseHolderTestClassProcessor.java
  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

    • -5
    • +5
    ./WorkerLeaseHolderTestClassProcessor.java
  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

    • -5
    • +5
    ./WorkerLeaseHolderTestClassProcessor.java
  1. … 76 more files in changeset.
Moved `Clock` and `TimeProvider` into a separate package

This commit reverts recent changes to the API of

`org.gradle.util.Clock`, and instead deprecates the existing type

replacing with a new internal type. This was done because the

`ExtractDslMetaDataTask` uses this type for timing, and external plugins may have copied this pattern.

`org.gradle.util.Clock` is now deprecated.

  1. … 103 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.

  1. … 9 more files in changeset.
Moved internal logging classes from 'core' to 'logging' project.

    • -1
    • +1
    ./DefaultStandardOutputRedirector.java
  1. … 417 more files in changeset.
Moved LinePerThreadBufferingOutputStream to live with other io classes.

    • -1
    • +1
    ./DefaultStandardOutputRedirector.java
  1. … 5 more files in changeset.
Moved `o.g.messaging.*` to `o.g.internal.*`.

  1. … 295 more files in changeset.
Add @Override where missing in production software model sources

Prior to this change, the affected submodules had 2044 occurrences of

the @Override annotation. With this commit, there are now 3492

occurrences. This suggests some divergence in IDE settings, either

across developers, across time, or both. At the moment, it appears that

IDEA (15 CE) is configured correctly to add @Override automatically.

This same refactoring should probably be done globally acrosse the

Gradle codebase, but has been constrained here to software model-related

submodules (a) because it is what the author is responsible for and (b)

because significant refactoring of type hierarchies is underway there

right now--the kind of work most likely to benefit from the compiler

checks that proper use of @Override affords.

Should this same refactoring be applied globally, it would be worth

looking into enforcing consistent use of @Override via checkstyle or

similar at the same time.

    • -0
    • +4
    ./CaptureTestOutputTestResultProcessor.java
    • -0
    • +7
    ./DefaultStandardOutputRedirector.java
    • -0
    • +3
    ./RestartEveryNTestClassProcessor.java
  1. … 414 more files in changeset.
Introduce `testing-base` module

This commit introduces a new `testing-base` module aimed at detangling the `plugins` module, by extracting 2 things:

* classes that are used independently of a testing framework or the JVM (`TestDescriptor`, ...)

* classes which are specific to JVM testing (`Test`, `TestReport`, `TestWorker`, ...)

The first category are extracted in the `testing-base` module. The second category have been migrated to the `testing-jvm` module, which now includes TestNG specific classes too.

* The `testing-jvm` module no longer depends on `plugins`, but on `testing-base` instead.

* The `plugins` module now depends on `testing-jvm` (so we have effectively inverted the dependency).

It's worth noting that while main classes have been shuffled around, test classes have not been moved, and some quality checks had to be disabled. For example, strict compilation and classcycle cannot be used anymore in the `testing-jvm` module without introducing breaking changes.

Two classes (`JUnitOptions` and `TestNGOptions`) have been migrated from Groovy to Java.

At this point, building Gradle is broken. Subsequent commits will fix that.

Story: gradle/langos#103

Item: refactor-plugins

    • -0
    • +90
    ./CaptureTestOutputTestResultProcessor.java
    • -0
    • +93
    ./DefaultStandardOutputRedirector.java
    • -0
    • +80
    ./MaxNParallelTestClassProcessor.java
    • -0
    • +66
    ./RestartEveryNTestClassProcessor.java
    • -0
    • +26
    ./StandardOutputRedirector.java
    • -0
    • +77
    ./TestMainAction.java
    • -0
    • +77
    ./TestOutputRedirector.java
  1. … 272 more files in changeset.