Uh oh!
There was an error while loading. Please reload this page.
Add FFE flag map adapter coverage - #11784
Conversation
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
/merge |
View all feedbacks in Devflow UI.
The expected merge time in
|
Uh oh!
There was an error while loading. Please reload this page.
8903488
into
masterUh oh!
There was an error while loading. Please reload this page.
Motivation
The restored JaCoCo coverage gate exposes that
RemoteConfigServiceImpl.FlagMapAdapterand its Moshi factory do not meet the per-class branch and instruction coverage thresholds. That leaves the FFE remote-config flag map deserialization path as one of the remaining blockers for re-enabling coverage verification cleanly.Changes
This adds focused JUnit coverage for the flag map adapter rather than changing production behavior. The new tests cover the Moshi factory accept/reject paths, null
flagspayloads, null individual flag entries inside an otherwise valid map, and the read-onlytoJsonpath.Decisions
The adapter stays included in coverage instead of being added to the exclusion list because its behavior is small, stable, and useful to verify: malformed or null flag entries should not prevent other flags in the same remote config payload from being parsed. The tests reuse the same date adapter shape needed by the production Moshi model adapter so the assertions exercise the real deserialization path.
Validation
./gradlew :products:feature-flagging:feature-flagging-lib:spotlessApply :products:feature-flagging:feature-flagging-lib:jacocoTestCoverageVerification -PcheckCoverage --console=plain./gradlew :products:feature-flagging:feature-flagging-lib:clean :products:feature-flagging:feature-flagging-lib:jacocoTestCoverageVerification -PcheckCoverage --console=plainNote: on current
master, a clean-PtestJvm=8 -PcheckCoveragerun still skips JaCoCo, so this PR fixes the FFE coverage violation while the globaltestJvmcoverage-enablement fix remains separate.