Skip to content

Add unit tests for ExhaustedDataLoaderDispatchStrategy#4306

Merged
andimarek merged 1 commit into
masterfrom
claude/analyze-coverage-drop-4GSSB
Mar 8, 2026
Merged

Add unit tests for ExhaustedDataLoaderDispatchStrategy#4306
andimarek merged 1 commit into
masterfrom
claude/analyze-coverage-drop-4GSSB

Conversation

@andimarek
Copy link
Copy Markdown
Member

Summary

  • Adds 8 targeted, deterministic unit tests for ExhaustedDataLoaderDispatchStrategy to recover branch and line coverage lost by PR Fix flaky DataLoaderPerformanceTest with deterministic synchronization #4299's switch from race-condition-dependent timing to deterministic latch-based synchronization
  • Tests directly exercise the concurrent state machine's code paths: dispatch triggers from both finishedFetching and newDataLoaderInvocation, the early-return when dataLoaderToDispatch is already set, multi-round dispatch with chained loading, serial strategy reset, subscription/deferred alternate call stacks, and startComplete/stopComplete coordination
  • All tests are fully deterministic with no timing dependencies

Test plan

  • All 8 new tests pass on Java 21
  • Verify CI passes across all Java versions
  • Confirm coverage report shows recovery of the -1.2% line / -7.7% branch drop on ExhaustedDataLoaderDispatchStrategy

https://claude.ai/code/session_01WwTVwjXS1wakJQmZYsXLvY

Add 8 deterministic tests that directly exercise the concurrent state
machine in ExhaustedDataLoaderDispatchStrategy, recovering branch and
line coverage lost when PR #4299 replaced race-condition-dependent
timing with deterministic latch-based synchronization.

Tests cover:
- Basic dispatch cycle (finishedFetching triggers dispatch)
- Early return in newDataLoaderInvocation when flag already set
- Dispatch from newDataLoaderInvocation when objectRunningCount is 0
- Multiple dispatch rounds with chained data loader invocations
- executionSerialStrategy state reset
- Subscription alternative call context with separate call stack
- startComplete/stopComplete dispatch coordination
- Deferred call context lazy call stack creation via computeIfAbsent

https://claude.ai/code/session_01WwTVwjXS1wakJQmZYsXLvY
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

Test Report

Test Results

Java Version Total Passed Failed Errors Skipped
Java 11 5679 (+8 🟢) 5622 (+8 🟢) 0 (±0) 0 (±0) 57 (±0)
Java 17 5679 (+8 🟢) 5621 (+8 🟢) 0 (±0) 0 (±0) 58 (±0)
Java 21 5679 (+8 🟢) 5621 (+8 🟢) 0 (±0) 0 (±0) 58 (±0)
Java 25 5679 (+8 🟢) 5621 (+8 🟢) 0 (±0) 0 (±0) 58 (±0)
jcstress 32 (±0) 32 (±0) 0 (±0) 0 (±0) 0 (±0)
Total 22748 (+32 🟢) 22517 (+32 🟢) 0 (±0) 0 (±0) 231 (±0)

Code Coverage (Java 25)

Metric Covered Missed Coverage vs Master
Lines 28699 3125 90.2% ±0.0%
Branches 8334 1508 84.7% ±0.0%
Methods 7681 1224 86.3% ±0.0%

Changed Class Coverage (2 classes)

Class Line Branch Method
g.e.i.d.ExhaustedDataLoaderDispatchStrategy +1.2% 🟢 +7.7% 🟢 ±0.0%
g.e.MergedSelectionSet ±0.0% +50.0% 🟢 ±0.0%

Full HTML report: build artifact jacoco-html-report

Updated: 2026-03-08 01:58:37 UTC

@andimarek andimarek merged commit 5e00d10 into master Mar 8, 2026
11 checks passed
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.

2 participants