Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 11 additions & 9 deletions docs/reference/sql/endpoints/translate.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,22 @@ Which returns:
--------------------------------------------------
{
"size": 10,
"docvalue_fields": [
"_source": false,
"fields": [
{
"field": "author"
},
{
"field": "name"
},
{
"field": "page_count"
},
{
"field": "release_date",
"format": "epoch_millis"
}
],
"_source": {
"includes": [
"author",
"name",
"page_count"
],
"excludes": []
},
"sort": [
{
"page_count": {
Expand Down
65 changes: 65 additions & 0 deletions x-pack/plugin/eql/qa/mixed-node/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apply plugin: 'elasticsearch.testclusters'
apply plugin: 'elasticsearch.standalone-rest-test'
apply from : "$rootDir/gradle/bwc-test.gradle"
apply plugin: 'elasticsearch.rest-test'

import org.elasticsearch.gradle.Version
import org.elasticsearch.gradle.VersionProperties
import org.elasticsearch.gradle.info.BuildParams
import org.elasticsearch.gradle.testclusters.StandaloneRestIntegTestTask

dependencies {
testImplementation project(':x-pack:qa')
testImplementation project(path: xpackModule('ql'), configuration: 'default')
testImplementation project(path: xpackModule('eql'), configuration: 'default')
}

tasks.named("integTest").configure{ enabled = false}

//for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it.onOrAfter('7.9.0') }) {
for (Version bwcVersion : BuildParams.bwcVersions.wireCompatible.findAll { it == Version.fromString("7.9.0") }) {
if (bwcVersion == VersionProperties.getElasticsearchVersion()) {
// Not really a mixed cluster
continue;
}

String baseName = "v${bwcVersion}"

testClusters {
"${baseName}" {
versions = [bwcVersion.toString(), project.version]
numberOfNodes = 3
testDistribution = 'DEFAULT'
setting 'xpack.security.enabled', 'false'
setting 'xpack.watcher.enabled', 'false'
setting 'xpack.ml.enabled', 'false'
setting 'xpack.eql.enabled', 'true'
setting 'xpack.license.self_generated.type', 'trial'
setting 'logger.org.elasticsearch.xpack.eql.plugin.TransportEqlSearchAction', 'TRACE'
}
}

tasks.register("${baseName}#mixedClusterTest", StandaloneRestIntegTestTask) {
useCluster testClusters."${baseName}"
mustRunAfter("precommit")
doFirst {
// Getting the endpoints causes a wait for the cluster
println "Endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
println "Upgrading one node to create a mixed cluster"
testClusters."${baseName}".nextNodeToNextVersion()

println "Upgrade complete, endpoints are: ${-> testClusters."${baseName}".allHttpSocketURI.join(",")}"
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
}
onlyIf { project.bwc_tests_enabled }
}

tasks.register(bwcTaskName(bwcVersion)) {
dependsOn "${baseName}#mixedClusterTest"
}

tasks.named("check").configure {
dependsOn "${baseName}#mixedClusterTest"
}
}
Loading