test

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumeMessages

func ConsumeMessages[P any](suite *PulsarTestSuite, ctx context.Context, consumer pulsar.Consumer, consumerId string, timeoutSeconds int) (actualPayloads []P)

func ProduceMessages

func ProduceMessages[P any](suite *PulsarTestSuite, ctx context.Context, producer pulsar.Producer, payloads []P)

func ProduceObjectsToTopic

func ProduceObjectsToTopic[P any](suite *PulsarTestSuite, topic connector.TopicName, payloads []P)

func ProduceToTopic

func ProduceToTopic(suite *PulsarTestSuite, topic connector.TopicName, payloads [][]byte)

func SubscribeToTopic

func SubscribeToTopic[P any](suite *PulsarTestSuite, topic connector.TopicName, payloads []P, subscription string) (consumeFunc func() []P)

SubscribeToTopic - subscribe to a topic and returns a function that consumes messages from the topic

Types

type PulsarTestSuite

type PulsarTestSuite struct {
	suite.Suite
	DefaultTestConfig config.PulsarConfig
	Client            connector.Client
	AppPortStart      int
	AdminPortStart    int
	// contains filtered or unexported fields
}

func (*PulsarTestSuite) SetupSuite

func (suite *PulsarTestSuite) SetupSuite()

func (*PulsarTestSuite) SetupTest

func (suite *PulsarTestSuite) SetupTest()

func (*PulsarTestSuite) TearDownSuite

func (suite *PulsarTestSuite) TearDownSuite()

func (*PulsarTestSuite) TearDownTest added in v0.0.10

func (suite *PulsarTestSuite) TearDownTest()

Jump to

Keyboard shortcuts

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