Skip to content

The index's tests take java.lang of the JDK; one keeps the whole - #141

Open
Pelotrio wants to merge 1 commit into
claude/test-suitefrom
claude/test-suite-jdk
Open

Pelotrio wants to merge 1 commit into
claude/test-suitefrom
claude/test-suite-jdk

Conversation

@Pelotrio

@Pelotrio Pelotrio commented Oct 5, 2026

Copy link
Copy Markdown
Member

M2, second PR, stacked on #140 (plan: docs/TEST_SUITE.md).

What was wrong

LocalIndexTest, RuntimeIndexRecoveryTest and RuntimeIndexServiceTest build, load and replace the runtime index. Every build indexed all 27,837 classes of the JDK, which took 42 s of Companion's suite. #140 measured this as the largest cost left.

What changes

  • RuntimeIndexService takes the JDK packages to index from its package-private constructor; empty means every package. Companion's public constructor still indexes the whole JDK.
  • The tests build the service through RuntimeTestSources.service, which gives java/lang/.
  • LocalIndexTest.companionsIndexHoldsTheWholeJdk builds Companion's own index and finds java.util.ArrayList and javax.swing.JComponent, which the slice leaves out.

Tests that build their own ClassIndex (JDT, references, completion) and tests that open a project through CompanionApplication are unchanged. #140 made ProjectTreeTest load a cached index.

Measured

The three suites take 9 s instead of 42 s, including the whole-JDK test.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T22:36:04.921196Z 58fa6e8 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Pelotrio
Pelotrio force-pushed the claude/test-suite-jdk branch from 02cc002 to a02dfe5 Compare October 5, 2026 22:23
LocalIndexTest, RuntimeIndexRecoveryTest and RuntimeIndexServiceTest build, load and replace the index, and each
build indexed all 27,837 classes of the JDK: 42 s of the suite. The service takes the JDK packages to index from a
package-private constructor; the tests' factory gives java/lang/, Companion's constructor every package. One test
builds Companion's own index and finds classes outside java.lang. 42 s become 9 s.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Pelotrio
Pelotrio force-pushed the claude/test-suite-jdk branch from a02dfe5 to 58fa6e8 Compare October 5, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant