Expand description
In-process Redis test transport used by application unit tests and the conformance suite.
Gated by the testing cargo feature. The broker is a synchronous dispatcher: publish fans the
message out to every subscriber whose stream key matches exactly. Public surface:
RedisTestBroker- the unconnected form, aBroker+DescribeServerbuilt synchronously like the real one;ConnectedRedisTestBroker- its connected form, backed by an in-process key router, which implementsSubscribeandruststream::testing::TestableBrokerso it plugs straight into theTestAppharness and the framework’s conformance suite;RedisTestPublish/RedisTestPublisher- the publish policy and the live publisher it pairs into, carrying both transaction kinds (RedisTestTransactionis the owned one);RedisTestSubscriber/RedisTestMessage-SubscriberandIncomingMessageimpls withnack(requeue = true)redelivery (re-sent into the same subscriber’s queue).
No redis-server, no docker, no network. Broker-specific edge cases (consumer-group cursors,
XAUTOCLAIM redelivery, idle reclaim, MAXLEN trimming, dead-letter routing) are out of scope
here. Exercise them against a real Redis server.
Structs§
- Connected
Redis Test Broker - The connected form of
RedisTestBroker: what the harness and the conformance suite drive. - Redis
Test Broker - In-process stand-in for
RedisBroker, used for handler-level tests. - Redis
Test Message - Message handed to handlers from a
RedisTestSubscriber. - Redis
Test Publish - The publish policy of the in-process broker, mirroring
RedisPublish. - Redis
Test Publisher - Publisher returned by
ConnectedRedisTestBroker::publisher. - Redis
Test Subscriber - Subscriber returned by
crate::testing::ConnectedRedisTestBroker::subscribe. - Redis
Test Transaction - An owned in-process transaction, opened by
transactionon aRedisTestPublisher.