diff --git a/qa/tribe-tests-with-license/build.gradle b/qa/tribe-tests-with-license/build.gradle index eb5373abc0a..1dbb32e6513 100644 --- a/qa/tribe-tests-with-license/build.gradle +++ b/qa/tribe-tests-with-license/build.gradle @@ -11,6 +11,7 @@ dependencies { } +task setupClusterOne {} ClusterConfiguration cluster1Config = new ClusterConfiguration(project) cluster1Config.clusterName = 'cluster1' cluster1Config.setting('node.name', 'cluster1-node1') @@ -22,8 +23,9 @@ cluster1Config.setting('xpack.watcher.enabled', false) cluster1Config.setting('xpack.graph.enabled', false) cluster1Config.setting('xpack.ml.enabled', false) -List cluster1Nodes = ClusterFormationTasks.setup(project, 'clusterOne', integTestRunner, cluster1Config) +List cluster1Nodes = ClusterFormationTasks.setup(project, 'clusterOne', setupClusterOne, cluster1Config) +task setupClusterTwo {} ClusterConfiguration cluster2Config = new ClusterConfiguration(project) cluster2Config.clusterName = 'cluster2' cluster2Config.setting('node.name', 'cluster2-node1') @@ -36,7 +38,7 @@ cluster2Config.setting('xpack.watcher.enabled', false) cluster2Config.setting('xpack.graph.enabled', false) cluster2Config.setting('xpack.ml.enabled', false) -List cluster2Nodes = ClusterFormationTasks.setup(project, 'clusterTwo', integTestRunner, cluster2Config) +List cluster2Nodes = ClusterFormationTasks.setup(project, 'clusterTwo', setupClusterTwo, cluster2Config) integTestCluster { setting 'node.name', 'tribe-node' @@ -70,7 +72,10 @@ integTestCluster { } integTestRunner { + dependsOn(setupClusterOne, setupClusterTwo) systemProperty 'tests.cluster', "${-> cluster1Nodes.get(0).transportUri()}" systemProperty 'tests.cluster2', "${-> cluster2Nodes.get(0).transportUri()}" systemProperty 'tests.tribe', "${-> integTest.nodes.get(0).transportUri()}" + finalizedBy 'clusterOne#stop' + finalizedBy 'clusterTwo#stop' } diff --git a/qa/tribe-tests-with-security/build.gradle b/qa/tribe-tests-with-security/build.gradle index 2ac4c61bc7d..0ed5f6c65e6 100644 --- a/qa/tribe-tests-with-security/build.gradle +++ b/qa/tribe-tests-with-security/build.gradle @@ -10,6 +10,7 @@ dependencies { testCompile project(path: ':x-pack-elasticsearch:plugin', configuration: 'testArtifacts') } +task setupClusterOne {} ClusterConfiguration configOne = new ClusterConfiguration(project) configOne.clusterName = 'cluster1' configOne.setting('node.name', 'cluster1-node1') @@ -28,8 +29,9 @@ configOne.waitCondition = { node, ant -> retries: 10) return tmpFile.exists() } -List cluster1Nodes = ClusterFormationTasks.setup(project, 'clusterOne', integTestRunner, configOne) +List cluster1Nodes = ClusterFormationTasks.setup(project, 'clusterOne', setupClusterOne, configOne) +task setupClusterTwo {} ClusterConfiguration configTwo = new ClusterConfiguration(project) configTwo.clusterName = 'cluster2' configTwo.setting('node.name', 'cluster2-node1') @@ -48,7 +50,7 @@ configTwo.waitCondition = { node, ant -> retries: 10) return tmpFile.exists() } -List cluster2Nodes = ClusterFormationTasks.setup(project, 'clusterTwo', integTestRunner, configTwo) +List cluster2Nodes = ClusterFormationTasks.setup(project, 'clusterTwo', setupClusterTwo, configTwo) integTestCluster { plugin ':x-pack-elasticsearch:plugin' @@ -79,7 +81,10 @@ integTestCluster { } integTestRunner { + dependsOn(setupClusterOne, setupClusterTwo) systemProperty 'tests.cluster', "${-> cluster1Nodes.get(0).transportUri()}" systemProperty 'tests.cluster2', "${-> cluster2Nodes.get(0).transportUri()}" systemProperty 'tests.tribe', "${-> integTest.nodes.get(0).transportUri()}" + finalizedBy 'clusterOne#stop' + finalizedBy 'clusterTwo#stop' }