Skip to main content

ruststream_fred/testing/
mod.rs

1//! In-process Redis test transport used by application unit tests and the conformance suite.
2//!
3//! Gated by the `testing` cargo feature. The broker is a synchronous dispatcher: `publish` fans the
4//! message out to every subscriber whose stream key matches exactly. Public surface:
5//!
6//! * [`RedisTestBroker`] - a full `Broker` + `Subscribe` + `DescribeServer` backed by an in-process
7//!   key router, which also implements [`ruststream::testing::TestableBroker`] so it plugs straight
8//!   into the [`TestApp`](ruststream::testing::TestApp) harness and
9//!   [`conformance::harness::run_suite`](ruststream::conformance::harness::run_suite);
10//! * [`RedisTestPublisher`] - `Publisher`;
11//! * [`RedisTestSubscriber`] / [`RedisTestMessage`] - `Subscriber` and `IncomingMessage` impls with
12//!   `nack(requeue = true)` redelivery (re-sent into the same subscriber's queue).
13//!
14//! No `redis-server`, no docker, no network. Broker-specific edge cases (consumer-group cursors,
15//! `XAUTOCLAIM` redelivery, idle reclaim, `MAXLEN` trimming, dead-letter routing) are out of scope
16//! here. Exercise them against a real Redis server.
17
18mod broker;
19mod publisher;
20mod router;
21mod subscriber;
22
23pub use broker::RedisTestBroker;
24pub use publisher::RedisTestPublisher;
25pub use subscriber::{RedisTestMessage, RedisTestSubscriber};