mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 13:38:49 +00:00
With this change, we apply the common test config automatically to all newly created tasks instead of opting in specifically. For plugin authors using the plugin externally this means that the configuration will be applied to their RandomizedTestingTasks as well. The purpose of the task is to simplify setup and make it easier to change projects that use the `test` task but actually run integration tests to use a task called `integTest` for clarity, but also because we may want to configure and run them differently. E.x. using different levels of concurrency.
48 lines
1.6 KiB
Groovy
48 lines
1.6 KiB
Groovy
import com.carrotsearch.gradle.junit4.RandomizedTestingTask
|
|
|
|
evaluationDependsOn(xpackModule('core'))
|
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
esplugin {
|
|
name 'x-pack-upgrade'
|
|
description 'Elasticsearch Expanded Pack Plugin - Upgrade'
|
|
classname 'org.elasticsearch.xpack.upgrade.Upgrade'
|
|
extendedPlugins = ['x-pack-core']
|
|
}
|
|
|
|
archivesBaseName = 'x-pack-upgrade'
|
|
|
|
dependencies {
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
|
}
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
run {
|
|
plugin xpackModule('core')
|
|
}
|
|
|
|
integTest.enabled = false
|
|
|
|
// Instead we create a separate task to run the
|
|
// tests based on ESIntegTestCase
|
|
task internalClusterTest(type: RandomizedTestingTask,
|
|
group: JavaBasePlugin.VERIFICATION_GROUP,
|
|
description: 'Multi-node tests',
|
|
dependsOn: test.dependsOn) {
|
|
classpath = project.test.classpath
|
|
testClassesDirs = project.test.testClassesDirs
|
|
include '**/*IT.class'
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
|
}
|
|
check.dependsOn internalClusterTest
|
|
internalClusterTest.mustRunAfter test
|
|
|
|
// also add an "alias" task to make typing on the command line easier
|
|
task icTest {
|
|
dependsOn internalClusterTest
|
|
}
|