Skip to content

Add tests for new Stream and ConsumersManager methods from PR #33#34

Merged
s3rius merged 1 commit intofeature/missing-apisfrom
copilot/add-tests-for-updated-functionality
Mar 26, 2026
Merged

Add tests for new Stream and ConsumersManager methods from PR #33#34
s3rius merged 1 commit intofeature/missing-apisfrom
copilot/add-tests-for-updated-functionality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

Covers the new API surface added in #33: direct subject access methods on Stream, delete_message, and consumer listing via ConsumersManager.

New tests (python/tests/test_stream_new_methods.py)

  • direct_get_next_for_subject — with and without sequence parameter
  • direct_get_first_for_subject / direct_get_last_for_subject — verifies correct message selection
  • delete_message — confirms message count decreases after deletion
  • ConsumersManager.list — iteration count, correct PullConsumer/PushConsumer type discrimination, empty stream
  • ConsumersManager.list_names — name matching, empty stream

Public API exports (python/natsrpy/js.py)

  • Added ConsumersIterator and ConsumersNamesIterator to imports and __all__

These types were defined in managers.pyi and registered in the Rust module but not re-exported from the Python package.

@s3rius s3rius marked this pull request as ready for review March 26, 2026 16:38
@s3rius s3rius merged commit 8110ccd into feature/missing-apis Mar 26, 2026
7 checks passed
@s3rius s3rius deleted the copilot/add-tests-for-updated-functionality branch March 26, 2026 16: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