Skip to content

Commit e3bc20a

Browse files
authored
char_filter pattern_replace error requires at least java 21 (#116507) (#116598)
This test requires at least java 21, skip it otherwise. closes: #116405 closes: #116134 (cherry picked from commit 91b4b1e)
1 parent b0ae9f0 commit e3bc20a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

modules/analysis-common/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* in compliance with, at your election, the Elastic License 2.0 or the Server
66
* Side Public License, v 1.
77
*/
8-
import org.elasticsearch.gradle.Version
8+
import org.elasticsearch.gradle.internal.info.BuildParams
99

1010
apply plugin: 'elasticsearch.internal-yaml-rest-test'
1111
apply plugin: 'elasticsearch.yaml-rest-compat-test'
@@ -29,6 +29,15 @@ dependencies {
2929
clusterModules project(':modules:mapper-extras')
3030
}
3131

32+
tasks.named("yamlRestTest").configure { task->
33+
if (BuildParams.getRuntimeJavaVersion().majorVersion.toInteger() < 21) {
34+
// Requires at least Java 21
35+
systemProperty 'tests.rest.blacklist', [
36+
"analysis-common/50_char_filters/pattern_replace error handling (too complex pattern)"
37+
].join(',')
38+
}
39+
}
40+
3241
tasks.named("yamlRestTestV7CompatTransform").configure { task ->
3342
task.skipTest("indices.analyze/10_analyze/htmlStrip_deprecated", "Cleanup versioned deprecations in analysis #41560")
3443
task.skipTest("analysis-common/40_token_filters/delimited_payload_filter_error", "Remove preconfigured delimited_payload_filter #43686")

0 commit comments

Comments
 (0)