package
0.0.0-20230102091508-02d5eeac7d74
Repository: https://github.com/golang-boy/watermill.git
Documentation: pkg.go.dev
# Functions
AddSimpleMessagesParallel publishes provided number of simple messages without a payload using the provided number of publishers (goroutines).
AssertAllMessagesReceived checks if all messages were received, ignoring the order and assuming that they are already deduplicated.
AssertMessagesMetadata checks if metadata of all received messages is the same as in expectedValues.
AssertMessagesPayloads check if received messages have the same payload as expected in expectedPayloads.
BenchSubscriber runs benchmark on a message Subscriber.
MissingMessages returns a list of missing messages UUIDs.
NewTestID returns a new unique TestID.
PublishSimpleMessages publishes provided number of simple messages without a payload.
RunOnlyFastTests returns true if -short flag was provided -race was not provided.
TestConcurrentClose tests if the Pub/Sub works correctly when subscribers are being closed concurrently.
TestConcurrentSubscribe tests subscribing to messages by multiple concurrent subscribers.
TestConcurrentSubscribeMultipleTopics tests subscribing to messages by concurrent subscribers on multiple topics.
TestConsumerGroups tests if the consumer groups feature behaves correctly.
TestContinueAfterErrors tests if messages are processed again after an initial failure.
TestContinueAfterSubscribeClose checks, that we don't lose messages after closing subscriber.
TestMessageCtx tests if the Message's Context works correctly.
TestNewSubscriberReceivesOldMessages tests if a new subscriber receives previously published messages.
TestNoAck tests if no new messages are received by the subscriber until the previous message is acknowledged.
TestPublisherClose sends big amount of messages and them run close to ensure that messages are not lost during adding.
TestPublishSubscribe runs basic publish and subscribe tests on a chosen Pub/Sub.
TestPublishSubscribeInOrder tests if published messages are received in a proper order.
TestPubSub is a universal test suite.
TestPubSubStressTest runs stress tests on a chosen Pub/Sub.
TestReconnect tests if reconnecting to a Pub/Sub works correctly.
TestResendOnError tests if messages are re-delivered after the subscriber fails to process them.
TestSubscribeCtx tests if the Subscriber's Context works correctly.
TestTopic tests if different topics work correctly in a Pub/Sub.
# Structs
Features are used to configure Pub/Subs implementations behaviour.
SimpleMessage is deprecated: not used anywhere internally.
TestContext is a collection of values that belong to a single test.
# Type aliases
BenchmarkPubSubConstructor is a function that creates a Publisher and Subscriber to be used for benchmarks.
ConsumerGroupPubSubConstructor is a function that creates a Publisher and a Subscriber that use given consumer group.
PubSubConstructor is a function that creates a Publisher and a Subscriber.
TestID is a unique ID of a test.