Skip to content

test: rebuild heap dump indexes when the MAT version changes - #133

Merged
vlsi merged 1 commit into
mainfrom
claude/mat-test-indexes-6379f1
Nov 8, 2026
Merged

vlsi merged 1 commit into
mainfrom
claude/mat-test-indexes-6379f1

Conversation

@vlsi

@vlsi vlsi commented Nov 8, 2026

Copy link
Copy Markdown
Owner

MAT opens the *.index and *.threads files next to a heap dump instead of parsing the dump again. MatCalciteTest/dumps ignores them in git, so a local run reused indexes built by whichever MAT ran there first, while CI parsed the dump from scratch. Indexes from MAT 1.13 hid how MAT 1.15 prints native frames: the tests passed locally and failed in CI with

expected:<...ng.Object.wait(J)V ([Native Method])> but was:<...ng.Object.wait(J)V ([Object.java(Native Method)])>

The tests now record the MAT bundle version, qualifier included, in dumps/mvn1m_jdk18.mat-version and delete the dump's index files when the record is missing or names another version. Deleting the indexes before every test class was rejected: each of the four classes would parse the dump again, and the same MAT would rebuild identical files.

No automated test covers the deletion itself. Checked by hand with ./mvnw -q verify (49 tests, 0 failures each time): garbage mvn1m_jdk18.idx.index and .threads with no version file were deleted and the dump reparsed; a rerun deleted nothing; a version file set to 1.0.0 led to all 12 index files being deleted and the version rewritten to 1.13.0.202204291409.

🤖 Generated with Claude Code

MAT opens the *.index and *.threads files next to a heap dump instead of
parsing the dump again. The files in MatCalciteTest/dumps are ignored by
git, so a local run reused indexes built by whichever MAT ran there
first, while CI parsed the dump from scratch. Indexes from MAT 1.13 hid a
difference in how MAT 1.15 prints native frames: the tests passed locally
and failed in CI with

    expected:<...ng.Object.wait(J)V ([Native Method])> but was:<...ng.Object.wait(J)V ([Object.java(Native Method)])>

The tests now record the MAT bundle version, qualifier included, in
dumps/mvn1m_jdk18.mat-version and delete the dump's index files when the
record is missing or names another version. Deleting the indexes before
every test class was rejected: each of the four classes would parse the
dump again, and the same MAT would rebuild identical files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vlsi
vlsi enabled auto-merge (squash) November 8, 2026 20:07
@vlsi
vlsi merged commit b900973 into main Nov 8, 2026
3 checks passed
@vlsi
vlsi deleted the claude/mat-test-indexes-6379f1 branch November 8, 2026 20:17
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