Cover remaining gaps and stop excluding tested classes from JaCoCo - #22
Merged
Merged
Conversation
Add tests for the unknown product type in ProductFactory, the "unhandled" end of the handler chain, GuiAppender attaching itself to the root logger, and Producer stopping when interrupted. Producer now restores the interrupt flag and returns instead of swallowing the interruption. Remove the JaCoCo excludes for the pattern ExampleRunner classes and the two properties classes, which already have full test coverage. Reported scope grows from 342 to 673 instructions at 100% instruction and branch coverage. Co-Authored-By: Claude Fable 5.1 <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.
Summary
First PR of the coverage plan (phases 1 and 2).
New tests
FactoryTests: unknown product type throwsIllegalArgumentExceptionChainTests: request nobody handles returns "unhandled"; last handler without a next returns "unhandled"GuiAppenderTests:afterPropertiesSetattaches the appender to the root logger and starts it (detached in cleanup)ProducerTests: producer stops when interruptedCode fix
Producerrestores the interrupt flag and returns onInterruptedExceptioninstead of swallowing it and continuing the loopJaCoCo excludes removed (classes already fully covered by existing tests)
**/*ExampleRunner*(the nine pattern runners;ProducerConsumerExampleRunnerstays excluded until phase 3)**/Messages*,**/ApplicationProperties*Coverage
Merging will trigger a badge regeneration PR from the maven build workflow.
Next
Phase 3: make
ExamplesCommandLineRunner,Consumer/ProducerConsumerExampleRunner,ObservableAbstractandHyperlinkMouseListenertestable and drop their excludes. Phase 4: raise the JaCoCo thresholds.🤖 Generated with Claude Code