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

Function TestSuccessorSingle

onecache/ring_test.go:41–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

39}
40
41func TestSuccessorSingle(t *testing.T) {
42 n, err := defaultTestNode()
43 if err != nil {
44 t.Fatalf("defaultTestNode() failed: %v", err)
45 }
46
47 // Get the successor and assert it is itself.
48 s := n.ring.successor(n.name)
49 if s != n.name {
50 t.Errorf("successor() returned %v; want %v", s, n.name)
51 }
52}
53
54func TestSuccessorValid(t *testing.T) {
55 nodes, err := connectedTestNodes(2, 1)

Callers

nothing calls this directly

Calls 2

defaultTestNodeFunction · 0.85
successorMethod · 0.65

Tested by

no test coverage detected