mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
REST-Tests: Use Dedicated AntBuilders (#35576)
* REST-Tests: Use Dedicated AntBuilders * Use dedicated AntBuilder everywhere since AntBuilder is not threadsafe * Closes #33778
This commit is contained in:
parent
eaf010cd73
commit
e6f4425e01
@ -140,7 +140,7 @@ class ClusterFormationTasks {
|
||||
} else {
|
||||
dependsOn = startTasks.empty ? startDependencies : startTasks.get(0)
|
||||
writeConfigSetup = { Map esConfig ->
|
||||
String unicastTransportUri = node.config.unicastTransportUri(nodes.get(0), node, project.ant)
|
||||
String unicastTransportUri = node.config.unicastTransportUri(nodes.get(0), node, project.createAntBuilder())
|
||||
if (unicastTransportUri == null) {
|
||||
esConfig['discovery.zen.ping.unicast.hosts'] = []
|
||||
} else {
|
||||
@ -717,7 +717,7 @@ class ClusterFormationTasks {
|
||||
Collection<String> unicastHosts = new HashSet<>()
|
||||
nodes.forEach { node ->
|
||||
unicastHosts.addAll(node.config.otherUnicastHostAddresses.call())
|
||||
String unicastHost = node.config.unicastTransportUri(node, null, project.ant)
|
||||
String unicastHost = node.config.unicastTransportUri(node, null, project.createAntBuilder())
|
||||
if (unicastHost != null) {
|
||||
unicastHosts.add(unicastHost)
|
||||
}
|
||||
@ -913,9 +913,10 @@ class ClusterFormationTasks {
|
||||
outputPrintStream: outputStream,
|
||||
messageOutputLevel: org.apache.tools.ant.Project.MSG_INFO)
|
||||
|
||||
project.ant.project.addBuildListener(listener)
|
||||
Object retVal = command(project.ant)
|
||||
project.ant.project.removeBuildListener(listener)
|
||||
AntBuilder ant = project.createAntBuilder()
|
||||
ant.project.addBuildListener(listener)
|
||||
Object retVal = command(ant)
|
||||
ant.project.removeBuildListener(listener)
|
||||
return retVal
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user