Improve time daemon coverage - #205
Open
MaciejSalwa543 wants to merge 5 commits into
Open
Conversation
Add test cases closing branch/line coverage gaps in msg_broker, ptp_machine, verification_machine, TimeJumpsValidator, and TimeoutValidator, plus PrintTo coverage for ptp_time_info and svt_time_info. Justify the remaining defensive/unreachable branches in tools/coverage/coverage_justifications.yaml. Refs eclipse-score#45 Signed-off-by: Maciej Salwa <maciej.salwa.ext@qorix.ai>
Convert per-field equality mutation tests to TEST_P (ptp_time_info_test.cpp) so each field is its own named test case. Rename msg_broker tests to match what they actually verify, rewrite ExpiredBrokerDoesNotProcessCallback to use a live consumer so non-delivery is observable, and rename the two ptp_machine tests to describe observable behavior rather than log output. Move the two VerificationMachine death tests into a dedicated VerificationMachineDeathTest suite per GTest convention. Refs eclipse-score#45 Signed-off-by: Maciej Salwa <maciej.salwa.ext@qorix.ai>
Switch MockConsumer::OnMessage to a real gmock MOCK_METHOD with a default action that still populates received_data, so ExpiredSubscriberDoesNotReceiveData can assert Times(0) instead of only relying on EXPECT_NO_THROW. Refs eclipse-score#45 Signed-off-by: Maciej Salwa <maciej.salwa.ext@qorix.ai>
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
pawelrutkaq
marked this pull request as ready for review
September 2, 2026 11:04
pawelrutkaq
reviewed
Sep 2, 2026
Run //:format.fix to reformat the TEST_P conversion in ptp_time_info_test.cpp, the ASSERT_DEATH call in verification_machine_test.cpp, and collapse the new coverage_justifications.yaml reason blocks to a single line each, matching CI's format.check gate. Refs eclipse-score#45 Signed-off-by: Maciej Salwa <maciej.salwa.ext@qorix.ai>
lavrovvalera
reviewed
Sep 2, 2026
Drop the PrintTo tests in ptp_time_info_test.cpp and svt_time_info_test.cpp; those PrintTo(..., std::ostream*) overloads are only ever called by GTest's own failure-printing machinery, not application code, so a test that just calls them directly was coverage-for-its-own-sake. Justify them in coverage_justifications.yaml instead (category: other, no existing category fit better). Refs eclipse-score#45 Signed-off-by: Maciej Salwa <maciej.salwa.ext@qorix.ai>
MaciejSalwa543
requested a deployment
to
workflow-approval
September 2, 2026 14:03 — with
GitHub Actions
Waiting
MaciejSalwa543
requested a deployment
to
workflow-approval
September 2, 2026 14:03 — with
GitHub Actions
Waiting
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.
Add test cases closing branch/line coverage gaps in msg_broker, ptp_machine, verification_machine, TimeJumpsValidator, and TimeoutValidator, plus PrintTo coverage for ptp_time_info and svt_time_info.
Justify the remaining defensive/unreachable branches in tools/coverage/coverage_justifications.yaml.
Verified locally:
bazel test //score/time_daemon/...(22/22 pass) andbazel coverage --config=llvm_cov //score/time_daemon/...— line coverage 96.85%, branch coverage~92%.
No production code was modified — this PR only adds tests and coverage justifications.
Related ticket
closes #45