Skip to content

Add tests to improve Rust code path coverage#41

Merged
s3rius merged 2 commits intomasterfrom
copilot/add-coverage-reports-functionality
Mar 27, 2026
Merged

Add tests to improve Rust code path coverage#41
s3rius merged 2 commits intomasterfrom
copilot/add-coverage-reports-functionality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Generated cargo llvm-cov report and added 41 tests across 8 files targeting meaningful uncovered Rust code paths (excluding __repr__/__str__).

Coverage improvements (Rust lines)

File Before After
js/managers/consumers.rs 67% 95%
subscriptions/callback.rs 65% 94%
js/managers/kv.rs 76% 100%
js/message.rs 81% 99%
js/stream.rs 62% 69%
Total 82.6% 87.7%

New test files

  • test_callback_subscription.pyCallbackSubscription.unsubscribe(), .unsubscribe(limit=), .drain()
  • test_consumers_manager.pyConsumersManager.delete(), .get_push(), .update() (pull/push), .pause(), .resume()
  • test_js_message_acks.py — Double ack variants, nack(delay=), .next(), .progress(double=True), .term(double=True), message nullable properties
  • test_stream_purge.pyStream.purge(sequence=), Stream.purge(keep=)
  • test_kv_manager.pyKVManager.update()
  • test_stream_config_types.pyExternal, Source, Placement, ConsumerLimits constructors and properties
  • test_publication_and_extras.pyPublication properties, queue group subscriptions, bytearray/memoryview payloads
  • test_consumer_properties.pyPullConsumer/PushConsumer .name/.stream_name, empty fetch

Also adds *.profraw to .gitignore.

Copilot AI and others added 2 commits March 27, 2026 02:27
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.78%. Comparing base (6e82b6f) to head (51aebed).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   82.87%   87.78%   +4.91%     
==========================================
  Files          30       30              
  Lines        3013     3013              
==========================================
+ Hits         2497     2645     +148     
+ Misses        516      368     -148     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@s3rius s3rius merged commit 5128362 into master Mar 27, 2026
9 checks passed
@s3rius s3rius deleted the copilot/add-coverage-reports-functionality branch March 27, 2026 02:42
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