testutil

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseConnectors

func CloseConnectors(t *testing.T, connectors []model.Connector)

func IsClusterMode added in v1.4.0

func IsClusterMode() bool

IsClusterMode reports whether the temporal tests are running against a Redis Cluster (TEST_ENABLE_CLUSTER=true) rather than a single node.

It exists so tests can account for cluster-only semantics. Notably, PUBLISH's reply counts only subscribers connected to the same node as the publisher; go-redis v9.11+ treats PUBLISH as keyless and routes it to a random node (while subscribers bind to the channel's slot node), so with subscribers present that count is non-deterministic even though delivery is unaffected.

func TestConnectors

func TestConnectors(t *testing.T) []model.Connector

Connectors returns a list of connectors to be used in tests. If you are adding a new supported driver, add it here and it will be tested on all the tcs automatically.

Types

type StubConnector

type StubConnector struct{}

func (*StubConnector) As

func (m *StubConnector) As(i interface{}) bool

func (*StubConnector) Connect

func (m *StubConnector) Connect(ctx context.Context) error

func (*StubConnector) Disconnect

func (m *StubConnector) Disconnect(ctx context.Context) error

func (*StubConnector) Ping

func (m *StubConnector) Ping(ctx context.Context) error

func (*StubConnector) Type

func (m *StubConnector) Type() string

Jump to

Keyboard shortcuts

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