Skip to content

Commit 32c7b06

Browse files
committed
QA: System property to override distribution (#30591)
This configures all `qa` projects to use the distribution contained in the `tests.distribution` system property if it is set. The goal is to create a simple way to run tests against the default distribution which has x-pack basic features enabled while not forcing these tests on all contributors. You run these tests by doing something like: ``` ./gradlew -p qa -Dtests.distribution=zip check ``` or ``` ./gradlew -p qa -Dtests.distribution=zip bwcTest ``` x-pack basic *shouldn't* get in the way of any of these tests but nothing is ever perfect so this we have to disable a few when running with the zip distribution.
1 parent d45ef00 commit 32c7b06

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

qa/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import org.elasticsearch.gradle.test.RestIntegTestTask
44
subprojects { Project subproj ->
55
subproj.tasks.withType(RestIntegTestTask) {
66
subproj.extensions.configure("${it.name}Cluster") { cluster ->
7-
cluster.distribution = 'oss-zip'
7+
cluster.distribution = System.getProperty('tests.distribution', 'oss-zip')
88
}
99
}
1010
}

qa/mixed-cluster/build.gradle

+8-1
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,16 @@ for (Version version : bwcVersions.wireCompatible) {
5757
bwcTest.dependsOn(versionBwcTest)
5858
}
5959

60-
/* To support taking index snapshots, we have to set path.repo setting */
6160
tasks.getByName("${baseName}#mixedClusterTestRunner").configure {
61+
/* To support taking index snapshots, we have to set path.repo setting */
6262
systemProperty 'tests.path.repo', new File(buildDir, "cluster/shared/repo")
63+
if ('zip'.equals(extension.distribution)) {
64+
systemProperty 'tests.rest.blacklist', [
65+
'cat.templates/10_basic/No templates',
66+
'cat.templates/10_basic/Sort templates',
67+
'cat.templates/10_basic/Multiple template',
68+
].join(',')
69+
}
6370
}
6471
}
6572

qa/smoke-test-multinode/build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ integTest {
2727
integTestCluster {
2828
numNodes = 2
2929
}
30+
31+
integTestRunner {
32+
if ('zip'.equals(integTestCluster.distribution)) {
33+
systemProperty 'tests.rest.blacklist', [
34+
'cat.templates/10_basic/No templates',
35+
'cat.templates/10_basic/Sort templates',
36+
'cat.templates/10_basic/Multiple template',
37+
].join(',')
38+
}
39+
}

qa/smoke-test-rank-eval-with-mustache/build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,11 @@ dependencies {
2626
testCompile project(path: ':modules:lang-mustache', configuration: 'runtime')
2727
}
2828

29+
/*
30+
* One of the integration tests doesn't work with the zip distribution
31+
* and will be fixed later.
32+
* Tracked by https://github.com/elastic/elasticsearch/issues/30628
33+
*/
34+
if ("zip".equals(integTestCluster.distribution)) {
35+
integTestRunner.enabled = false
36+
}

test/framework/src/main/java/org/elasticsearch/test/junit/listeners/ReproduceInfoPrinter.java

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public ReproduceErrorMessageBuilder appendESProperties() {
149149
}
150150
appendOpt("tests.locale", Locale.getDefault().toLanguageTag());
151151
appendOpt("tests.timezone", TimeZone.getDefault().getID());
152+
appendOpt("tests.distribution", System.getProperty("tests.distribution"));
152153
return this;
153154
}
154155

0 commit comments

Comments
 (0)