Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS: Use File Based Discovery in REST Tests #34560

Merged
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5d9d619
TESTS: Use File Based Discovery in REST Tests
original-brownbear Oct 17, 2018
48decc7
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 17, 2018
50a8033
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 17, 2018
cd50d89
Use file based discovery in 6.x as well
original-brownbear Oct 17, 2018
a3128ac
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 18, 2018
ca832d2
Don't use file based discovery when other discovery mechanism is conf…
original-brownbear Oct 18, 2018
dcf5625
Merge branch 'master' into rest-tests-file-discovery
original-brownbear Oct 18, 2018
8ba68ce
only use file based discovery in 6.5+
original-brownbear Oct 18, 2018
3e0251c
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 19, 2018
48d2c87
Fix unicast hosts returned as csv erring out and order of ready checks
original-brownbear Oct 19, 2018
8dfc3d2
CR comments
original-brownbear Oct 19, 2018
0fd5217
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 19, 2018
a3b9e55
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 20, 2018
2052e0c
CR: only compute unicast hosts txt once
original-brownbear Oct 20, 2018
391a8a6
CR: Don't depend on the seed node starting up for other nodes to star…
original-brownbear Oct 20, 2018
fca6c93
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 22, 2018
33f044a
CR: Different code paths for 6.5+ and older versions, minimum number …
original-brownbear Oct 22, 2018
7d32ba4
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 23, 2018
61bc8ad
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 23, 2018
f641b82
increase timeout
original-brownbear Oct 23, 2018
97420c5
TEST: Make other nodes depend on first node
original-brownbear Oct 23, 2018
5c332d0
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 23, 2018
ed3b328
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 24, 2018
9a9bf8d
Merge remote-tracking branch 'elastic/master' into rest-tests-file-di…
original-brownbear Oct 24, 2018
ac02a81
back to correct task order
original-brownbear Oct 24, 2018
622231d
try reverting master node count change
original-brownbear Oct 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,13 @@ class ClusterFormationTasks {

Task writeConfig = project.tasks.create(name: name, type: DefaultTask, dependsOn: setup)
writeConfig.doFirst {
String unicastTransportUri = node.config.unicastTransportUri(seedNode, node, project.ant)
if (unicastTransportUri != null) {
esConfig['discovery.zen.ping.unicast.hosts'] = "\"${unicastTransportUri}\""
if (node.nodeVersion.onOrAfter("7.0.0-SNAPSHOT")) {
esConfig['discovery.zen.hosts_provider'] = 'file'
} else {
String unicastTransportUri = node.config.unicastTransportUri(seedNode, node, project.ant)
if (unicastTransportUri != null) {
esConfig['discovery.zen.ping.unicast.hosts'] = "\"${unicastTransportUri}\""
DaveCTurner marked this conversation as resolved.
Show resolved Hide resolved
}
}
File configFile = new File(node.pathConf, 'elasticsearch.yml')
logger.info("Configuring ${configFile}")
Expand Down Expand Up @@ -703,6 +707,22 @@ class ClusterFormationTasks {
}
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make this PR 4% smaller by removing this line again ;)

nodes.forEach {node ->
if (node.nodeVersion.onOrAfter("7.0.0-SNAPSHOT")) {
Collection<String> unicastHosts = new HashSet<>()
nodes.forEach { otherNode ->
DaveCTurner marked this conversation as resolved.
Show resolved Hide resolved
String unicastHost = node.config.unicastTransportUri(otherNode, node, project.ant)
if (unicastHost != null) {
unicastHosts.add(unicastHost)
}
}
node.pathConf.toPath().resolve("unicast_hosts.txt").setText(
String.join("\n", unicastHosts)
)
}
}

if (ant.properties.containsKey("failed${name}".toString())) {
waitFailed(project, nodes, logger, "Failed to start elasticsearch: timed out after ${waitSeconds} seconds")
}
Expand Down