Exclude the loopback HTTP server test from the animalsniffer check - #118
Merged
pjfanning merged 1 commit intoSep 7, 2026
Merged
Conversation
ParseUrlRedirectTest (added in apache#113) starts a com.sun.net.httpserver server on loopback to pin redirect following. That package is not in the Android API signature animalsniffer checks against, so animalsnifferTest reports 19 undefined references and ./gradlew check fails. The signature describes what the published artifact may use. Test code never ships and never runs on Android, so exclude just this file rather than weaken the signature for main. Excluding the whole test source set would also work - the animalsniffer block already carries a commented-out "sourceSets = [sourceSets.main]" for that - but this keeps the rest of the tests covered. Co-Authored-By: Claude Opus 5 (1M context) <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.
ParseUrlRedirectTest, added in #113, starts acom.sun.net.httpserverserver on loopback to pin redirect following inSchemaTypeLoaderBase.parse(URL). That package is not part of the Android API signature (gummy-bears-api-${androidSdkMinimum}) animalsniffer checks against, soanimalsnifferTestreports 19 undefined references and./gradlew checkfails on trunk:My fault — I added that test without running
check. Apologies for the breakage.The signature describes what the published artifact may use. Test code never ships and never runs on Android, so this excludes the one file rather than weakening the signature for
main:animalsnifferTest { exclude '**/ParseUrlRedirectTest*' }Excluding the whole test source set would also work — the
animalsnifferblock already carries a commented-outsourceSets = [sourceSets.main]for exactly that — but this keeps the rest of the tests covered. Happy to switch to the broader form if you'd prefer it../gradlew animalsnifferTest animalsnifferMainpasses; the task still runs, with only that file filtered out.🤖 Generated with Claude Code