Skip to content

[BUG] org.opensearch.ingest.common.DateProcessorTests.testJavaPatternLocale from :modules:ingest-common:test fails with reproducible seed on JDK 23 #16513

@cwperks

Description

@cwperks

Describe the bug

This seed consistently fails

./gradlew ':modules:ingest-common:test' --tests "org.opensearch.ingest.common.DateProcessorTests.testJavaPatternLocale" -Dtests.seed=8EBCFF3C373929DC -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=he -Dtests.timezone=Pacific/Galapagos -Druntime.java=23

Failure message:

  2> java.lang.IllegalArgumentException: unable to parse date [2010 12 giugno]
        at __randomizedtesting.SeedInfo.seed([8EBCFF3C373929DC:D0B6833ADCC9BAE2]:0)
        at org.opensearch.ingest.common.DateProcessor.execute(DateProcessor.java:136)
        at org.opensearch.ingest.common.DateProcessorTests.testJavaPatternLocale(DateProcessorTests.java:180)

        Caused by:
        java.lang.IllegalArgumentException: failed to parse date field [2010 12 giugno] with format [yyyy dd MMMM]
            at org.opensearch.common.time.JavaDateFormatter.parse(JavaDateFormatter.java:283)
            at org.opensearch.ingest.common.DateFormat$5.lambda$getFunction$0(DateFormat.java:119)
            at org.opensearch.ingest.common.DateProcessor.execute(DateProcessor.java:128)
            ... 1 more

            Caused by:
            java.time.format.DateTimeParseException: Text '2010 12 giugno' could not be parsed at index 8
                at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2108)
                at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1936)
                at org.opensearch.common.time.OpenSearchDateTimeFormatter.parse(OpenSearchDateTimeFormatter.java:71)
                at org.opensearch.common.time.JavaDateFormatter.doParse(JavaDateFormatter.java:322)
                at org.opensearch.common.time.JavaDateFormatter.parse(JavaDateFormatter.java:281)
                ... 3 more

Related component

Plugins

To Reproduce

Run with seed:

./gradlew ':modules:ingest-common:test' --tests "org.opensearch.ingest.common.DateProcessorTests.testJavaPatternLocale" -Dtests.seed=8EBCFF3C373929DC -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=he -Dtests.timezone=Pacific/Galapagos -Druntime.java=23

Expected behavior

Test passes

Additional Details

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions