Skip to content

Conversation

@ivancea
Copy link
Contributor

@ivancea ivancea commented Aug 19, 2025

Failing seed:

gradlew ":libs:core:test" --tests "org.elasticsearch.core.GlobTests.testInfixStringMatch" -Dtests.seed=5A350F059EF7A84D

Error:

java.lang.AssertionError: Expect [Jc"q`tw~u`] to not match '**Jc"q`tw~u`*'
    Expected: is <false>
         but: was <true>
        at __randomizedtesting.SeedInfo.seed([5A350F059EF7A84D:453FB4F0F691121A]:0)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.elasticsearch.test.ESTestCase.assertThat(ESTestCase.java:2710)
        at org.elasticsearch.core.GlobTests.assertNonMatch(GlobTests.java:171)
        at org.elasticsearch.core.GlobTests.testInfixStringMatch(GlobTests.java:124)

It fails because there's an asterisk at the beginning. Other tests could fail too if asterisks appear at unwanted places. So I removed the asterisks from the strings altogether, as they're already being tested anyway

@ivancea ivancea requested a review from a team as a code owner August 19, 2025 14:43
@ivancea ivancea added >test Issues or PRs that are addressing/adding tests v9.2.0 labels Aug 19, 2025
@ivancea ivancea requested a review from tvernum August 19, 2025 14:43
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Aug 19, 2025
@ivancea ivancea added :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team and removed needs:triage Requires assignment of a team area label labels Aug 19, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)


private String randomAsciiString(int length) {
return randomAsciiString(length, ch -> ch >= ' ' && ch <= '~');
return randomAsciiString(length, ch -> ch >= ' ' && ch <= '~' && ch != '*');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is identical to the randomAsciiStringNoAsterisks introduced in #133114, I think this has already been addressed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks for noticing! I'm closing this one

@ivancea ivancea closed this Aug 20, 2025
@ivancea ivancea deleted the fix-flaky-glob-test branch August 20, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants