-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>non-issueTeam:DeliveryMeta label for Delivery teamMeta label for Delivery teamv6.6.0v7.0.0-beta1
Description
Gradle deprecated removing a task if it's added as a dependency.
Do not remove a Task instance from a task dependency set when it contains a Provider to the Task instance. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0.
at org.gradle.api.internal.tasks.DefaultTaskDependency$TaskDependencySet.remove(DefaultTaskDependency.java:245)
at java_util_Set$remove$0.call(Unknown Source)
at com.carrotsearch.gradle.junit4.RandomizedTestingPlugin.replaceTestTask(RandomizedTestingPlugin.groovy:98)
at com.carrotsearch.gradle.junit4.RandomizedTestingPlugin$replaceTestTask$0.callStatic(Unknown Source)
at com.carrotsearch.gradle.junit4.RandomizedTestingPlugin.apply(RandomizedTestingPlugin.groovy:22)
at com.carrotsearch.gradle.junit4.RandomizedTestingPlugin.apply(RandomizedTestingPlugin.groovy)
[...]
"Provider to the Task instance" is part of the delayed task ( a.k.a lazy task ) improvements added in 4.8, documented and refined in 4.9, and in this case it's not something we can control as the initial test task is represented as a provider, we have no control to change that, we also don't have control to prevent adding it as a dependency.
This will effectively prevent us from replacing the test task in Gradle 5.0.
Some options that come to mind:
- disable
testand create a newrandomizedTesttask instead - use the Gradle test runner. This will require us to configure the security manager as described in Run tests with Gradle test runner instead of randomizedtesting.junit4-ant #31496. We will not have randomization of class order unless Provide the possibility to pseudo-randomize test class order gradle/gradle#5760 is addressed . We will still have randomization of method order.
- we can probably start hacking around it, like excluding all tests and adding a task action to run the randomized testing ant runner, but we don't want to go there.
Metadata
Metadata
Assignees
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>non-issueTeam:DeliveryMeta label for Delivery teamMeta label for Delivery teamv6.6.0v7.0.0-beta1