testing

package
v1.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PoolMaxIdle is the number of maximum idle redis connections in a redis pool
	PoolMaxIdle = 5
	// PoolMaxActive is the number of maximum active redis connections in a redis pool
	PoolMaxActive = 5
	// PoolIdleTimeout is the idle duration allowance of a redis connection a a redis pool
	PoolIdleTimeout = 10 * time.Second
	// PoolHealthCheckTimeout is the read/write timeout of a healthcheck HTTP request
	PoolHealthCheckTimeout = 100 * time.Millisecond

	// InitialInterval is the initial backoff time of a backoff strategy
	InitialInterval = 30 * time.Millisecond
	// RandFactor is the randomization factor of a backoff strategy
	RandFactor = .5
	// Multiplier is the multuplier used in a exponential backoff strategy
	Multiplier = .5
	// MaxInterval is the maximum retry interval of a backoff strategy
	MaxInterval = 300 * time.Millisecond
	// MaxElapsedTime is the maximum total retry time of a backoff stragegy
	MaxElapsedTime = 1000 * time.Millisecond
)

Variables

This section is empty.

Functions

func New

func New(t *testing.T, cfg config.Mutable) func()

New creates a new in memory Redis instance with Sentinel for testing.

func NewStoreServiceForTesting

func NewStoreServiceForTesting(t *testing.T, cfg config.Mutable) (statestore.Service, func())

NewStoreServiceForTesting creates a new statestore service for testing

Types

This section is empty.

Jump to

Keyboard shortcuts

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