test

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Harness

type Harness struct {
	// contains filtered or unexported fields
}

func NewHarness

func NewHarness(t *testing.T, n int) *Harness

func NewHarnessWithPort

func NewHarnessWithPort(t *testing.T, n int, basePort int) *Harness

func (*Harness) AddNodeToCluster

func (h *Harness) AddNodeToCluster(leaderId int, newId int)

func (*Harness) CheckAppend

func (h *Harness) CheckAppend(c *kvclient.KVClient, key, value string) (string, bool)

func (*Harness) CheckCAS

func (h *Harness) CheckCAS(c *kvclient.KVClient, key, compare, value string) (string, bool)

func (*Harness) CheckGet

func (h *Harness) CheckGet(c *kvclient.KVClient, key string, wantValue string)

func (*Harness) CheckGetNotFound

func (h *Harness) CheckGetNotFound(c *kvclient.KVClient, key string)

func (*Harness) CheckGetTimesOut

func (h *Harness) CheckGetTimesOut(c *kvclient.KVClient, key string)

func (*Harness) CheckPeerList

func (h *Harness) CheckPeerList(id int, wantPeers []int)

func (*Harness) CheckPut

func (h *Harness) CheckPut(c *kvclient.KVClient, key, value string) (string, bool)

func (*Harness) CheckPutWithLease

func (h *Harness) CheckPutWithLease(c *kvclient.KVClient, key, value string, leaseID int64) (string, bool)

func (*Harness) CheckSingleLeader

func (h *Harness) CheckSingleLeader() int

func (*Harness) CrashService

func (h *Harness) CrashService(id int)

func (*Harness) DelayNextHTTPResponseFromService

func (h *Harness) DelayNextHTTPResponseFromService(id int)

func (*Harness) DisconnectServiceFromPeers

func (h *Harness) DisconnectServiceFromPeers(id int)

func (*Harness) NewClient

func (h *Harness) NewClient() *kvclient.KVClient

func (*Harness) NewClientSingleService

func (h *Harness) NewClientSingleService(id int) *kvclient.KVClient

func (*Harness) NewClientWithRandomAddrsOrder

func (h *Harness) NewClientWithRandomAddrsOrder() *kvclient.KVClient

func (*Harness) ReconnectServiceToPeers

func (h *Harness) ReconnectServiceToPeers(id int)

func (*Harness) RemoveNodeFromCluster

func (h *Harness) RemoveNodeFromCluster(leaderId int, targetId int)

func (*Harness) RestartService

func (h *Harness) RestartService(id int)

func (*Harness) Shutdown

func (h *Harness) Shutdown()

Jump to

Keyboard shortcuts

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