MCPcopy Create free account
hub / github.com/dadgar/onecache / defaultTestNode

Function defaultTestNode

onecache/test_util.go:20–31  ·  view source on GitHub ↗

Returns a single test node with replica parameter of 2.

()

Source from the content-addressed store, hash-verified

18
19// Returns a single test node with replica parameter of 2.
20func defaultTestNode() (*Node, error) {
21 n, err := Create(buildTestConfig(2, 0, 0))
22 if err != nil {
23 return nil, err
24 }
25
26 // Allow the node to setup.
27 n.Start()
28 time.Sleep(10 * time.Millisecond)
29
30 return n, nil
31}
32
33// Returns a list of n Node's that have joined each other.
34func connectedTestNodes(n int, replicas int) ([]*Node, error) {

Callers 7

TestExitFunction · 0.85
TestJoinInvalidFunction · 0.85
TestBuildPeerNameValidFunction · 0.85
TestSuccessorSingleFunction · 0.85
BenchmarkMemcacheSetGetFunction · 0.85

Calls 3

CreateFunction · 0.85
buildTestConfigFunction · 0.85
StartMethod · 0.80

Tested by 7

TestExitFunction · 0.68
TestJoinInvalidFunction · 0.68
TestBuildPeerNameValidFunction · 0.68
TestSuccessorSingleFunction · 0.68
BenchmarkMemcacheSetGetFunction · 0.68