Skip to content

Commit acdad55

Browse files
authored
Avoid eager creation of rest test tasks (#92855)
The standard Gradle `withType()` method that takes an action is the "legacy" API which realizes tasks eagerly. To avoid this, we need to explicitly use `configureEach()` to pass our configuration action.
1 parent e535df6 commit acdad55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void apply(Project project) {
107107

108108
});
109109

110-
project.getTasks().withType(StandaloneRestIntegTestTask.class, task -> {
110+
project.getTasks().withType(StandaloneRestIntegTestTask.class).configureEach(task -> {
111111
SystemPropertyCommandLineArgumentProvider nonInputSystemProperties = task.getExtensions()
112112
.getByType(SystemPropertyCommandLineArgumentProvider.class);
113113

0 commit comments

Comments
 (0)