infrastructure

package
v0.4.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSimpleMessages added in v0.3.0

func AddSimpleMessages(t *testing.T, messagesCount int, publisher message.Publisher, topicName string) message.Messages

func AddSimpleMessagesParallel added in v0.3.0

func AddSimpleMessagesParallel(t *testing.T, messagesCount int, publisher message.Publisher, topicName string, publishers int) message.Messages

func BenchSubscriber

func BenchSubscriber(b *testing.B, pubSubConstructor BenchmarkPubSubConstructor)

func RunOnlyFastTests added in v0.4.0

func RunOnlyFastTests() bool

RunOnlyFastTests returns true if -short flag was provided -race was not provided. Useful for excluding some slow tests.

func TestConcurrentClose added in v0.3.0

func TestConcurrentClose(t *testing.T, createPubSub PubSubConstructor, features Features)

func TestConsumerGroups added in v0.3.0

func TestConsumerGroups(t *testing.T, pubSubConstructor ConsumerGroupPubSubConstructor, features Features)

func TestContinueAfterErrors added in v0.3.0

func TestContinueAfterErrors(t *testing.T, createPubSub PubSubConstructor, features Features)

func TestContinueAfterSubscribeClose added in v0.3.0

func TestContinueAfterSubscribeClose(t *testing.T, createPubSub PubSubConstructor, features Features)

TestContinueAfterSubscribeClose checks, that we don't lose messages after closing subscriber.

func TestMessageCtx added in v0.3.0

func TestMessageCtx(t *testing.T, pubSub PubSub, features Features)

func TestNoAck added in v0.3.0

func TestNoAck(t *testing.T, pubSub PubSub, features Features)

func TestNoGroupSubscriber

func TestNoGroupSubscriber(
	t *testing.T,
	pubSubConstructor PubSubConstructor,
	noGroupSubscriberConstructor NoGroupSubscriberConstructor,
)

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 added in v0.3.0

func TestPublishSubscribe(t *testing.T, pubSub PubSub, features Features)

func TestPublishSubscribeInOrder added in v0.3.0

func TestPublishSubscribeInOrder(t *testing.T, pubSub PubSub, features Features)

func TestPublisherClose added in v0.3.0

func TestPublisherClose(t *testing.T, pubSub PubSub, features Features)

TestPublisherClose sends big amount of messages and them run close to ensure that messages are not lost during adding.

func TestReconnect added in v0.3.0

func TestReconnect(t *testing.T, pubSub PubSub, features Features)

func TestResendOnError added in v0.3.0

func TestResendOnError(t *testing.T, pubSub PubSub, features Features)

func TestSubscribeCtx added in v0.3.0

func TestSubscribeCtx(t *testing.T, pubSub PubSub, features Features)

func TestTopic added in v0.3.0

func TestTopic(t *testing.T, pubSub PubSub, features Features)

Types

type BenchmarkPubSubConstructor

type BenchmarkPubSubConstructor func(n int) message.PubSub

type ConsumerGroupPubSubConstructor

type ConsumerGroupPubSubConstructor func(t *testing.T, consumerGroup string) PubSub

type Features

type Features struct {
	ConsumerGroups      bool
	ExactlyOnceDelivery bool
	GuaranteedOrder     bool
	Persistent          bool

	RestartServiceCommand []string
}

type NoGroupSubscriberConstructor

type NoGroupSubscriberConstructor func(t *testing.T) message.Subscriber

type PubSub added in v0.3.0

type PubSub interface {
	message.PubSub

	// Subscriber is needed for unwrapped message.PubSub's subscriber, containing SubscribeInitializer.
	Subscriber() message.Subscriber
}

type PubSubConstructor

type PubSubConstructor func(t *testing.T) PubSub

type SimpleMessage

type SimpleMessage struct {
	Num int `json:"num"`
}

Directories

Path Synopsis
AMQP implementation of Watermill's Pub/Sub interface.
AMQP implementation of Watermill's Pub/Sub interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL