OpenSearch/x-pack/plugin/ccr/build.gradle
Mark Vieira 1287c7d91f
[Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993)
* Replace usages RandomizedTestingTask with built-in Gradle Test (#40978)

This commit replaces the existing RandomizedTestingTask and supporting code with Gradle's built-in JUnit support via the Test task type. Additionally, the previous workaround to disable all tasks named "test" and create new unit testing tasks named "unitTest" has been removed such that the "test" task now runs unit tests as per the normal Gradle Java plugin conventions.

(cherry picked from commit 323f312bbc829a63056a79ebe45adced5099f6e6)

* Fix forking JVM runner

* Don't bump shadow plugin version
2019-04-09 11:52:50 -07:00

71 lines
2.0 KiB
Groovy

evaluationDependsOn(xpackModule('core'))
apply plugin: 'elasticsearch.esplugin'
esplugin {
name 'x-pack-ccr'
description 'Elasticsearch Expanded Pack Plugin - CCR'
classname 'org.elasticsearch.xpack.ccr.Ccr'
hasNativeController false
requiresKeystore true
extendedPlugins = ['x-pack-core']
}
archivesBaseName = 'x-pack-ccr'
integTest.enabled = false
// Integration Test classes that cannot run with the security manager
String[] noSecurityManagerITClasses = [ "**/CloseFollowerIndexIT.class" ]
task internalClusterTestNoSecurityManager(type: Test) {
description = 'Java fantasy integration tests with no security manager'
include noSecurityManagerITClasses
systemProperty 'es.set.netty.runtime.available.processors', 'false'
systemProperty 'tests.security.manager', 'false'
}
// Instead we create a separate task to run the
// tests based on ESIntegTestCase
task internalClusterTest(type: Test) {
description = 'Java fantasy integration tests'
dependsOn internalClusterTestNoSecurityManager
mustRunAfter test
include '**/*IT.class'
exclude noSecurityManagerITClasses
systemProperty 'es.set.netty.runtime.available.processors', 'false'
}
check.dependsOn internalClusterTest
// add all sub-projects of the qa sub-project
gradle.projectsEvaluated {
project.subprojects
.find { it.path == project.path + ":qa" }
.subprojects
.findAll { it.path.startsWith(project.path + ":qa") }
.each { check.dependsOn it.check }
}
dependencies {
compileOnly "org.elasticsearch:elasticsearch:${version}"
compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(path: xpackModule('monitoring'), configuration: 'testArtifacts')
}
dependencyLicenses {
ignoreSha 'x-pack-core'
}
run {
plugin xpackModule('core')
}
testingConventions.naming {
IT {
baseClass "org.elasticsearch.xpack.CcrIntegTestCase"
}
}