test: fail loud when the golden corpus is missing#19
Merged
Conversation
locateCorpus returned null when third_party/zstd/tests was absent, and filesIn turned that into an empty stream — so a missing submodule silently skipped every golden test and still went green. Throw instead: the corpus is the vendored zstd submodule, so its absence is a setup error worth surfacing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add maven-enforcer requireFilesExist on third_party/zstd/tests in the integration-tests module, bound to validate. A missing submodule now fails the build up front with a message telling the user to run 'git submodule update --init --recursive', instead of failing later. The runtime IllegalStateException stays as a backstop for direct/IDE runs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make a missing golden corpus (the vendored
third_party/zstd/testssubmodule) fail loudly with a helpful message, at two levels:Build-time (primary): a
maven-enforcerrequireFilesExistrule in the integration-tests module, bound tovalidate. If the submodule isn't checked out, the build fails before compiling/testing with:Runtime (backstop):
locateCorpus()now throwsIllegalStateException(with the same hint) instead of returningnull, whichfilesInhad turned into an empty stream — silently skipping every golden test while staying green. Drops the deadTESTS == nullguard. Covers direct/IDE test runs that bypass the enforcer.Test
./mvnw -pl integration-tests validate— enforcer rule passes (corpus present)../mvnw -pl integration-tests -am test -Dtest=GoldenCorpusTest— 18 green.🤖 Generated with Claude Code