helper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCPort                   = 1101
	MetricsPort               = 1102
	MongoConnectionURI        = "mongodb://localhost:27017"
	MongoConnectionTimeoutSec = 5
	MongoPingTimeoutSec       = 5
	SnapshotThreshold         = 10
	Collection                = "test-collection"
)

Below are the values of the Yorkie config used in the test.

Variables

This section is empty.

Functions

func ByteCountIEC

func ByteCountIEC(b uint64) string

ByteCountIEC returns humanized size in IEC(binary) format.

func PrintMemStats

func PrintMemStats()

PrintMemStats prints memory stats.

func PrintSnapshotBytesSize

func PrintSnapshotBytesSize(bytes []byte)

PrintSnapshotBytesSize prints the humanized size of the given snapshot.

func TestDBName

func TestDBName() string

TestDBName returns the name of test database with timestamp. timestamp is set only once on first call.

func TestRoot

func TestRoot() *json.Root

TestRoot returns the root

func TestYorkie

func TestYorkie() *yorkie.Yorkie

TestYorkie returns Yorkie instance for testing.

func TextChangeContext

func TextChangeContext(root *json.Root) *change.Context

TextChangeContext returns the context of test change.

Types

This section is empty.

Jump to

Keyboard shortcuts

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