Documentation ¶
Index ¶
- func AddSimpleMessagesParallel(t *testing.T, messagesCount int, publisher message.Publisher, topicName string, ...) message.Messages
- func AssertAllMessagesReceived(t *testing.T, sent message.Messages, received message.Messages) bool
- func AssertMessagesMetadata(t *testing.T, key string, expectedValues map[string]string, ...) bool
- func AssertMessagesPayloads(t *testing.T, expectedPayloads map[string]interface{}, ...) bool
- func BenchSubscriber(b *testing.B, pubSubConstructor BenchmarkPubSubConstructor)
- func MissingMessages(expected message.Messages, received message.Messages) []string
- func PublishSimpleMessages(t *testing.T, messagesCount int, publisher message.Publisher, topicName string) message.Messages
- func RunOnlyFastTests() bool
- func TestConcurrentClose(t *testing.T, tCtx TestContext, createPubSub PubSubConstructor)
- func TestConcurrentSubscribe(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestConsumerGroups(t *testing.T, tCtx TestContext, ...)
- func TestContinueAfterErrors(t *testing.T, tCtx TestContext, createPubSub PubSubConstructor)
- func TestContinueAfterSubscribeClose(t *testing.T, tCtx TestContext, createPubSub PubSubConstructor)
- func TestMessageCtx(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestNewSubscriberReceivesOldMessages(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestNoAck(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestPubSub(t *testing.T, features Features, pubSubConstructor PubSubConstructor, ...)
- func TestPubSubStressTest(t *testing.T, features Features, pubSubConstructor PubSubConstructor, ...)
- func TestPublishSubscribe(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestPublishSubscribeInOrder(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestPublisherClose(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestReconnect(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestResendOnError(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestSubscribeCtx(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- func TestTopic(t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor)
- type BenchmarkPubSubConstructor
- type ConsumerGroupPubSubConstructor
- type Features
- type PubSubConstructor
- type SimpleMessage
- type TestContext
- type TestID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertMessagesMetadata ¶
func AssertMessagesPayloads ¶
func BenchSubscriber ¶
func BenchSubscriber(b *testing.B, pubSubConstructor BenchmarkPubSubConstructor)
func MissingMessages ¶
func PublishSimpleMessages ¶
func RunOnlyFastTests ¶
func RunOnlyFastTests() bool
RunOnlyFastTests returns true if -short flag was provided -race was not provided. Useful for excluding some slow tests.
func TestConcurrentClose ¶
func TestConcurrentClose( t *testing.T, tCtx TestContext, createPubSub PubSubConstructor, )
func TestConcurrentSubscribe ¶
func TestConcurrentSubscribe( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestConsumerGroups ¶
func TestConsumerGroups( t *testing.T, tCtx TestContext, pubSubConstructor ConsumerGroupPubSubConstructor, )
func TestContinueAfterErrors ¶
func TestContinueAfterErrors( t *testing.T, tCtx TestContext, createPubSub PubSubConstructor, )
func TestContinueAfterSubscribeClose ¶
func TestContinueAfterSubscribeClose( t *testing.T, tCtx TestContext, createPubSub PubSubConstructor, )
TestContinueAfterSubscribeClose checks, that we don't lose messages after closing subscriber.
func TestMessageCtx ¶
func TestMessageCtx( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestNewSubscriberReceivesOldMessages ¶
func TestNewSubscriberReceivesOldMessages( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestNoAck ¶
func TestNoAck( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestPubSub ¶
func TestPubSub( t *testing.T, features Features, pubSubConstructor PubSubConstructor, consumerGroupPubSubConstructor ConsumerGroupPubSubConstructor, )
func TestPubSubStressTest ¶
func TestPubSubStressTest( t *testing.T, features Features, pubSubConstructor PubSubConstructor, consumerGroupPubSubConstructor ConsumerGroupPubSubConstructor, )
func TestPublishSubscribe ¶
func TestPublishSubscribe( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestPublishSubscribeInOrder ¶
func TestPublishSubscribeInOrder( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestPublisherClose ¶
func TestPublisherClose( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
TestPublisherClose sends big amount of messages and them run close to ensure that messages are not lost during adding.
func TestReconnect ¶
func TestReconnect( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestResendOnError ¶
func TestResendOnError( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestSubscribeCtx ¶
func TestSubscribeCtx( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
func TestTopic ¶
func TestTopic( t *testing.T, tCtx TestContext, pubSubConstructor PubSubConstructor, )
Types ¶
type BenchmarkPubSubConstructor ¶
type BenchmarkPubSubConstructor func(n int) (message.Publisher, message.Subscriber)
type Features ¶
type Features struct { ConsumerGroups bool ExactlyOnceDelivery bool GuaranteedOrder bool // Some Pub/Subs guarantees order only when one subscriber is subscribing. GuaranteedOrderWithSingleSubscriber bool Persistent bool RestartServiceCommand []string // RequireSingleInstance must be true, if PubSub requires single instance to work properly // (for example: channel implementation). RequireSingleInstance bool NewSubscriberReceivesOldMessages bool }
Features are used to configure Pub/Subs implementations behaviour. Different features set decides also which, and how tests should be run.
type PubSubConstructor ¶
type SimpleMessage ¶
type SimpleMessage struct {
Num int `json:"num"`
}
type TestContext ¶
Click to show internal directories.
Click to hide internal directories.