{{ message }}
Add unit tests for PerLevelDataLoaderDispatchStrategy coverage#4308
Merged
Add unit tests for PerLevelDataLoaderDispatchStrategy coverage#4308
Conversation
Cover concurrency-dependent code paths that were previously only exercised non-deterministically by integration tests, causing flaky coverage gate failures in PRs: - markLevelAsDispatchedIfReady: test the "another thread already dispatched" path (line 447) that requires two threads to race on dispatchedLevels.add() - executeObjectOnFieldValuesException: error recovery path never triggered by integration tests - executionStrategyOnFieldValuesException: same error recovery pattern at the root execution strategy level - Concurrent onCompletionFinished race: two threads completing the same level simultaneously Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Make CallStack, its fields, and markLevelAsDispatchedIfReady package-private so tests can access them directly without reflection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert JUnit test to Groovy/Spock to match project conventions. Co-Authored-By: Claude Opus 4.6 <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
PerLevelDataLoaderDispatchStrategyto deterministically cover concurrency-dependent code paths that are otherwise only hit under specific thread timing in integration tests.markLevelAsDispatchedIfReadyrace condition (line 447), both exception handlers (executeObjectOnFieldValuesException,executionStrategyOnFieldValuesException), and concurrentonCompletionFinisheddispatch.Test plan
./gradlew test jacocoTestReport🤖 Generated with Claude Code