test(moq): add unit tests for vendored OrderedProducer and CatalogConsumer#457
Conversation
…sumer Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| // Frame at the max duration boundary closes the old group and | ||
| // starts a fresh one for this frame. |
There was a problem hiding this comment.
🟡 Redundant test comment violates the repository comment rules
The added comment narrates the exact scenario and expected state that the following op.write(&make_frame(10_000)) call and assertions exercise. AGENTS.md makes the comment guidelines mandatory and explicitly forbids line-narration/restating how code works, so this new comment should be removed or replaced with a non-obvious why if one exists.
Prompt for agents
Remove the redundant comment in crates/nodes/src/transport/moq/ordered_producer.rs within the max_duration_auto_closes_old_group_and_starts_new test. The test name, write call, and assertions already express the behavior being verified; keeping the comment violates the repository's AGENTS.md guidance against line narration and comments that restate how code works.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
Removed in 663d8ca. The test name and assertions are sufficient.
Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #457 +/- ##
==========================================
+ Coverage 65.68% 65.97% +0.28%
==========================================
Files 217 217
Lines 57357 57496 +139
Branches 1597 1597
==========================================
+ Hits 37674 37932 +258
+ Misses 19677 19558 -119
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
Summary
Adds 16 unit tests for the vendored
OrderedProducerandCatalogConsumermodules introduced in #453 to improve patch coverage on these files (previously at 0%).OrderedProducer tests (12): construction,
with_max_group_duration,Fromtrait,Deref, first-frame group creation, multi-frame counter, keyframe no-op on empty, keyframe closing active group, keyframe-then-write new group, max-duration auto-close,finishwith active group,finishon empty.CatalogConsumer tests (4): construction,
Fromtrait,next()returnsNonewhen track is finished,next()returns a catalog from a written frame (round-trip throughmoq_liteproducer/consumer).Review & Testing Checklist for Human
cargo test -p streamkit-nodes --features moqto confirm all 507 tests passNotes
Test-only PR, no production code changes. Follows existing test conventions in
pull.rs(clippy suppressions forunwrap_used/expect_used,#[tokio::test]for moq_lite runtime requirement).Link to Devin session: https://staging.itsdev.in/sessions/802a16b8707f4c50916049aaa55c6fc2
Requested by: @streamer45
Devin Review
d70c1eb(HEAD isf76d010)