Skip to content

Conversation

@gaborbernat
Copy link
Contributor

@gaborbernat gaborbernat commented Jan 3, 2026

The test expected 4 suggestions: ["me", "method", "message", "meta"]

On macOS, it sometimes only returns 3: ["me", "message", "method"] - missing "meta".

Where each suggestion comes from:

  • me - from Kotlin source: "me and I" in helloWorld.kt
  • method - from Java identifiers: Method, InnerMethod, AbstractMethod in Sample.java
  • message - from Java source code
  • meta - from JAR's META-INF/ directory path (main.jar contains META-INF/)

The first 3 come from reliably indexed source code content. The 4th ("meta") comes from JAR path indexing, which appears to be inconsistent on macOS.

Evidence:

  1. CI failure showed exactly: no item matches: "meta" in ["me", "message", "method"]
  2. Searching source files for words starting with "me" returns only me and message
  3. The JAR contains META-INF/ directory which is the only source of "meta"
  4. Same test failed on master branch (run 20161796379 on Dec 12) with identical error

Changed assertion to verify the 3 stable suggestions are present instead of requiring all 4.

Related to #2704

Ran into this while working on #4890

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 3, 2026
@gaborbernat gaborbernat force-pushed the fix-flaky-suggester-test branch 2 times, most recently from 00953ae to 6b2d360 Compare January 3, 2026 01:22
The test expected 4 suggestions including "meta" from the JAR's
META-INF directory, but this indexing is inconsistent on macOS.
Changed assertion to verify the 3 stable suggestions are present.

Fixes oracle#2704

Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
@vladak vladak force-pushed the fix-flaky-suggester-test branch from 6b2d360 to b5d4aeb Compare January 5, 2026 13:45
@vladak
Copy link
Member

vladak commented Jan 5, 2026

Thanks for the analysis and the fix, much appreciated as this has been hunting the test runs for a long time.

@vladak vladak merged commit 09ea873 into oracle:master Jan 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants