-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] add multi node integ tests for data frames (#41508)
* [ML] adding native-multi-node-integTests for data frames' * addressing streaming issues * formatting fixes * Addressing PR comments
- Loading branch information
Showing
10 changed files
with
531 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apply plugin: 'elasticsearch.standalone-rest-test' | ||
apply plugin: 'elasticsearch.rest-test' | ||
|
||
dependencies { | ||
testCompile project(path: xpackModule('core'), configuration: 'default') | ||
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
testCompile project(path: xpackModule('data-frame'), configuration: 'runtime') | ||
} | ||
|
||
// location for keys and certificates | ||
File keystoreDir = new File(project.buildDir, 'keystore') | ||
File nodeKey = file("$keystoreDir/testnode.pem") | ||
File nodeCert = file("$keystoreDir/testnode.crt") | ||
// Add key and certs to test classpath: it expects it there | ||
task copyKeyCerts(type: Copy) { | ||
from(project(':x-pack:plugin:core').file('src/test/resources/org/elasticsearch/xpack/security/transport/ssl/certs/simple/')) { | ||
include 'testnode.crt', 'testnode.pem' | ||
} | ||
into keystoreDir | ||
} | ||
// Add keys and cets to test classpath: it expects it there | ||
sourceSets.test.resources.srcDir(keystoreDir) | ||
processTestResources.dependsOn(copyKeyCerts) | ||
|
||
integTestCluster { | ||
dependsOn copyKeyCerts | ||
setting 'xpack.security.enabled', 'true' | ||
setting 'xpack.license.self_generated.type', 'trial' | ||
setting 'xpack.monitoring.enabled', 'false' | ||
setting 'xpack.security.authc.token.enabled', 'true' | ||
setting 'xpack.security.transport.ssl.enabled', 'true' | ||
setting 'xpack.security.transport.ssl.key', nodeKey.name | ||
setting 'xpack.security.transport.ssl.certificate', nodeCert.name | ||
setting 'xpack.security.transport.ssl.verification_mode', 'certificate' | ||
setting 'xpack.security.audit.enabled', 'false' | ||
setting 'xpack.license.self_generated.type', 'trial' | ||
keystoreSetting 'bootstrap.password', 'x-pack-test-password' | ||
keystoreSetting 'xpack.security.transport.ssl.secure_key_passphrase', 'testnode' | ||
setupCommand 'setupDummyUser', | ||
'bin/elasticsearch-users', 'useradd', 'x_pack_rest_user', '-p', 'x-pack-test-password', '-r', 'superuser' | ||
|
||
numNodes = 3 | ||
extraConfigFile nodeKey.name, nodeKey | ||
extraConfigFile nodeCert.name, nodeCert | ||
waitCondition = { node, ant -> | ||
File tmpFile = new File(node.cwd, 'wait.success') | ||
ant.get(src: "http://${node.httpUri()}/_cluster/health?wait_for_nodes=>=${numNodes}&wait_for_status=yellow", | ||
dest: tmpFile.toString(), | ||
username: 'x_pack_rest_user', | ||
password: 'x-pack-test-password', | ||
ignoreerrors: true, | ||
retries: 10) | ||
return tmpFile.exists() | ||
} | ||
} |
Oops, something went wrong.