@@ -72,10 +72,9 @@ class ClusterFormationTasks {
72
72
throw new GradleException (" bwcVersion must not be null if numBwcNodes is > 0" )
73
73
}
74
74
// this is our current version distribution configuration we use for all kinds of REST tests etc.
75
- project. configurations {
76
- elasticsearchDistro
77
- }
78
- configureDistributionDependency(project, config. distribution, project. configurations. elasticsearchDistro, VersionProperties . elasticsearch)
75
+ String distroConfigName = " ${ task.name} _elasticsearchDistro"
76
+ Configuration distro = project. configurations. create(distroConfigName)
77
+ configureDistributionDependency(project, config. distribution, distro, VersionProperties . elasticsearch)
79
78
if (config. bwcVersion != null && config. numBwcNodes > 0 ) {
80
79
// if we have a cluster that has a BWC cluster we also need to configure a dependency on the BWC version
81
80
// this version uses the same distribution etc. and only differs in the version we depend on.
@@ -91,10 +90,9 @@ class ClusterFormationTasks {
91
90
// we start N nodes and out of these N nodes there might be M bwc nodes.
92
91
// for each of those nodes we might have a different configuratioon
93
92
String elasticsearchVersion = VersionProperties . elasticsearch
94
- Configuration configuration = project. configurations. elasticsearchDistro
95
93
if (i < config. numBwcNodes) {
96
94
elasticsearchVersion = config. bwcVersion
97
- configuration = project. configurations. elasticsearchBwcDistro
95
+ distro = project. configurations. elasticsearchBwcDistro
98
96
}
99
97
NodeInfo node = new NodeInfo (config, i, project, task, elasticsearchVersion, sharedDir)
100
98
if (i == 0 ) {
@@ -105,7 +103,7 @@ class ClusterFormationTasks {
105
103
config. seedNodePortsFile = node. transportPortsFile;
106
104
}
107
105
nodes. add(node)
108
- startTasks. add(configureNode(project, task, cleanup, node, configuration ))
106
+ startTasks. add(configureNode(project, task, cleanup, node, distro ))
109
107
}
110
108
111
109
Task wait = configureWaitTask(" ${ task.name} #wait" , project, nodes, startTasks)
0 commit comments