Skip to content

Commit 5530caa

Browse files
Fix tests with warnings due to date format changes in JDK 23 (#113253)
Adding warnings like ``` Date format [MMMM] contains textual field specifiers that could change in JDK 23 ``` to failing tests, due to changes recently introduced about Locale Provider Fixes: #113226 Fixes: #113227 Fixes: #113198 Fixes: #113199 Fixes: #113200
1 parent f7ff00f commit 5530caa

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

muted-tests.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,6 @@ tests:
238238
- class: org.elasticsearch.logsdb.datageneration.DataGeneratorTests
239239
method: testDataGeneratorProducesValidMappingAndDocument
240240
issue: https://github.com/elastic/elasticsearch/issues/112966
241-
- class: org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT
242-
method: test {p0=esql/70_locale/Date format with Italian locale}
243-
issue: https://github.com/elastic/elasticsearch/issues/113198
244-
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
245-
method: test {date.DateFormatLocale SYNC}
246-
issue: https://github.com/elastic/elasticsearch/issues/113199
247-
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
248-
method: test {date.DateFormatLocale ASYNC}
249-
issue: https://github.com/elastic/elasticsearch/issues/113200
250241
- class: org.elasticsearch.xpack.core.security.authz.RoleDescriptorTests
251242
method: testHasPrivilegesOtherThanIndex
252243
issue: https://github.com/elastic/elasticsearch/issues/113202
@@ -271,12 +262,6 @@ tests:
271262
- class: org.elasticsearch.xpack.esql.expression.function.aggregate.AvgTests
272263
method: "testFold {TestCase=<double> #2}"
273264
issue: https://github.com/elastic/elasticsearch/issues/113225
274-
- class: org.elasticsearch.xpack.esql.qa.mixed.EsqlClientYamlIT
275-
method: test {p0=esql/70_locale/Date format with default locale}
276-
issue: https://github.com/elastic/elasticsearch/issues/113226
277-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
278-
method: test {p0=search/180_locale_dependent_mapping/Test Index and Search locale dependent mappings / dates}
279-
issue: https://github.com/elastic/elasticsearch/issues/113227
280265
- class: org.elasticsearch.index.mapper.DoubleRangeFieldMapperTests
281266
method: testSyntheticSourceKeepAll
282267
issue: https://github.com/elastic/elasticsearch/issues/113234

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/180_locale_dependent_mapping.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
---
22
"Test Index and Search locale dependent mappings / dates":
3+
- requires:
4+
test_runner_features: ["allowed_warnings"]
35
- do:
6+
allowed_warnings:
7+
- "Date format [E, d MMM yyyy HH:mm:ss Z] contains textual field specifiers that could change in JDK 23"
48
indices.create:
59
index: test_index
610
body:

x-pack/plugin/esql/qa/testFixtures/src/main/resources/date.csv-spec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ emp_no:integer | year:long | month:long | day:long
554554
dateFormatLocale
555555
from employees | where emp_no == 10049 or emp_no == 10050 | sort emp_no
556556
| eval birth_month = date_format("MMMM", birth_date) | keep emp_no, birth_date, birth_month;
557+
warningRegex:Date format \[MMMM\] contains textual field specifiers that could change in JDK 23
557558
ignoreOrder:true
558559

559560
emp_no:integer | birth_date:datetime | birth_month:keyword

x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/esql/70_locale.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ setup:
2929
- do:
3030
allowed_warnings_regex:
3131
- "No limit defined, adding default limit of \\[.*\\]"
32+
- "Date format \\[MMMM\\] contains textual field specifiers that could change in JDK 23"
3233
esql.query:
3334
body:
3435
query: 'FROM events | eval fixed_format = date_format("MMMM", @timestamp), variable_format = date_format(format, @timestamp) | sort @timestamp | keep @timestamp, fixed_format, variable_format'
@@ -50,6 +51,7 @@ setup:
5051
- do:
5152
allowed_warnings_regex:
5253
- "No limit defined, adding default limit of \\[.*\\]"
54+
- "Date format \\[MMMM\\] contains textual field specifiers that could change in JDK 23"
5355
esql.query:
5456
body:
5557
query: 'FROM events | eval fixed_format = date_format("MMMM", @timestamp), variable_format = date_format(format, @timestamp) | sort @timestamp | keep @timestamp, fixed_format, variable_format'

0 commit comments

Comments
 (0)