feat: Add comprehensive testing and documentation for Unidirectional Channel API (Issue #93) #99
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.
This pull request addresses Issue #93 by implementing comprehensive integration tests, documentation, and examples for the new unidirectional channel API, aiming to ensure reliability and ease of adoption.
Summary of Changes:
tests/unidirectional_streams.rswith 8 comprehensive tests covering single stream, multiple concurrent streams, error handling, protocol compatibility, malformed data, large events, and concurrent processing with limits.benches/unidirectional_streams.rsto benchmark event throughput, event size, concurrent streams, and deserialization overhead.src/server.rswith comprehensive module-level documentation and examples for basic usage, multiple streams, and integration into connection loops.docs/migration-guide.mdproviding a clear path for migrating existing applications, including before/after code, step-by-step instructions, and benefits.examples/event_handler.rswith three complete demonstrations showcasing single stream handling, concurrent streams, and error handling with metrics.README.mdto include a Features section and detailed documentation for the Unidirectional Event Stream API.criterionandtokio-testas dev-dependencies and introduced atest-supportfeature to expose testing infrastructure.Technical Improvements:
test-supportfeature.close()methods for both server and client connections (available withtest-support).TestEnvironmentand related methods public for integration tests.Known Issues:
Closes #93