testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SimulacronStartIp = "127.0.0.101"

Variables

This section is empty.

Functions

func AfterTestSuite

func AfterTestSuite()

func BeforeTestSuite

func BeforeTestSuite()

func CreateSchema

func CreateSchema(name string)

func CreateSimulacronCluster

func CreateSimulacronCluster(dc1Length int, dc2Length int)

func EnsureCcmCluster

func EnsureCcmCluster(setupHandler func(), queries ...string)

func EnsureSimulacronCluster

func EnsureSimulacronCluster()

func GetSession

func GetSession() *gocql.Session

Gets the shared session for this suite

func PanicIfError

func PanicIfError(err error)

func StartSimulacron

func StartSimulacron()

func StopSimulacron

func StopSimulacron()

func TestLogger

func TestLogger() log.Logger

Types

type ClusterQueryLogReport

type ClusterQueryLogReport struct {
	Id          int64                      `json:"id"`
	DataCenters []DataCenterQueryLogReport `json:"data_centers"`
}

func GetQueryLogs

func GetQueryLogs(dcIndex int) ClusterQueryLogReport

type DataCenterQueryLogReport

type DataCenterQueryLogReport struct {
	Id    int64                `json:"id"`
	Nodes []NodeQueryLogReport `json:"nodes"`
}

type Frame

type Frame struct {
	ProtocolVersion int     `json:"protocol_version"`
	Message         Message `json:"message"`
}

type Message

type Message struct {
	Type  string `json:"type"`
	Query string `json:"query"`
}

type NodeQueryLogReport

type NodeQueryLogReport struct {
	Id      int64      `json:"id"`
	Queries []QueryLog `json:"queries"`
}

type QueryLog

type QueryLog struct {
	Connection string `json:"connection"`
	Frame      Frame  `json:"frame"`
}

type QueryMatches

type QueryMatches struct {
	Prepare int
	Execute int
}

func CountLogMatches

func CountLogMatches(nodeLogs []NodeQueryLogReport, query string) QueryMatches

Directories

Path Synopsis
ddl

Jump to

Keyboard shortcuts

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