testutils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTestReadMessages

func BuildTestReadMessages(count int64, startTime time.Time, keys []string) []isb.ReadMessage

BuildTestReadMessages builds test isb.ReadMessage which can be used for testing.

func BuildTestReadMessagesIntOffset added in v0.6.4

func BuildTestReadMessagesIntOffset(count int64, startTime time.Time, keys []string) []isb.ReadMessage

BuildTestReadMessagesIntOffset builds test isb.ReadMessage which can be used for testing.

func BuildTestWindowRequests added in v1.2.0

func BuildTestWindowRequests(count int64, startTime time.Time, windowOp window.Operation) []window.TimedWindowRequest

BuildTestWindowRequests builds test window.TimedWindowRequest which can be used for testing.

func BuildTestWriteMessages

func BuildTestWriteMessages(count int64, startTime time.Time, keys []string, vertexName string) []isb.Message

BuildTestWriteMessages builds test isb.Message which can be used for testing.

func CopyUDFTestApply

func CopyUDFTestApply(ctx context.Context, vertexName string, readMessages []*isb.ReadMessage) ([]isb.ReadWriteMessagePair, error)

CopyUDFTestApply applies a copy UDF that simply copies the input to output.

func CopyUDFTestApplyBatchMap added in v1.3.0

func CopyUDFTestApplyBatchMap(ctx context.Context, vertexName string, readMessages []*isb.ReadMessage) ([]isb.ReadWriteMessagePair, error)

func CopyUDFTestApplyStream added in v0.8.1

func CopyUDFTestApplyStream(ctx context.Context, vertexName string, writeMessageCh chan<- isb.WriteMessage, readMessage *isb.ReadMessage) error

func ReadMessagesLen

func ReadMessagesLen(ctx context.Context, options *redis.UniversalOptions, streamName string, expectedValue int64) bool

ReadMessagesLen is used to test the length of the messages read as they arrive on the stream If a stream already has 5 elements which have been read and then we add another set of elements of 10 the total number would be 15.

Types

type PayloadForTest

type PayloadForTest struct {
	Key   string
	Value int64
}

PayloadForTest is a dummy payload for testing.

Jump to

Keyboard shortcuts

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