testutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MemoryConnectionString a memory cache driver test connection string
	MemoryConnectionString = "memory:"
	// BuntDBConnectionString a buntdb cache driver test connection string
	BuntDBConnectionString = "buntdb://:memory:"
	// EtcdConnectionString a etcd cache driver test connection string
	EtcdConnectionString = "etcd://127.0.0.1:2379?dial_timeout=5s"
	// RedisConnectionString a redis cache driver test connection string
	RedisConnectionString = "redis://127.0.0.1:6379"
	// DefaultExpiration the default expiration time for cache driver tests
	DefaultExpiration = time.Second * 3
)

Variables

This section is empty.

Functions

func BenchmarkCacheGet

func BenchmarkCacheGet(b *testing.B, conn string, expiration time.Duration)

BenchmarkCacheGet the benchmark test of get cache data

func BenchmarkCacheSet

func BenchmarkCacheSet(b *testing.B, conn string, expiration time.Duration)

BenchmarkCacheSet the benchmark test of set cache data

func TestCache

func TestCache(t *testing.T, conn string, expiration time.Duration)

TestCache test the cache with the passed connection string

Types

This section is empty.

Jump to

Keyboard shortcuts

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