Skip to content

Commit 34e7858

Browse files
committed
Build: Make additional test deps of check (#32015)
This commit moves additional unit test runners from being dependencies of the test task to dependencies of check. Without this change, reproduce lines are incorrect due to the additional test runner not matching any of the reproduce class/method info. closes #31964
1 parent 461baec commit 34e7858

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

+2-1
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,8 @@ class BuildPlugin implements Plugin<Project> {
762762
additionalTest.testClassesDirs = test.testClassesDirs
763763
additionalTest.configure(commonTestConfig(project))
764764
additionalTest.configure(config)
765-
test.dependsOn(additionalTest)
765+
additionalTest.dependsOn(project.tasks.testClasses)
766+
project.check.dependsOn(additionalTest)
766767
});
767768
return test
768769
}

server/build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,16 @@ if (isEclipse) {
156156
compileJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
157157
compileTestJava.options.compilerArgs << "-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked"
158158

159+
// TODO: remove ScriptDocValuesMissingV6BehaviourTests in 7.0
160+
additionalTest('testScriptDocValuesMissingV6Behaviour'){
161+
include '**/ScriptDocValuesMissingV6BehaviourTests.class'
162+
systemProperty 'es.scripting.exception_for_missing_value', 'false'
163+
}
164+
test {
165+
// these are tested explicitly in separate test tasks
166+
exclude '**/*ScriptDocValuesMissingV6BehaviourTests.class'
167+
}
168+
159169
forbiddenPatterns {
160170
exclude '**/*.json'
161171
exclude '**/*.jmx'

0 commit comments

Comments
 (0)