MCPcopy
hub / github.com/olric-data/olric / TestClusterClient_RoutingTable_Cluster

Function TestClusterClient_RoutingTable_Cluster

cluster_client_test.go:84–102  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestClusterClient_RoutingTable_Cluster(t *testing.T) {
85 cluster := newTestOlricCluster(t)
86 cluster.addMember(t) // Cluster coordinator
87 <-time.After(250 * time.Millisecond)
88
89 db := cluster.addMember(t)
90
91 ctx := context.Background()
92 c, err := NewClusterClient([]string{db.name})
93 require.NoError(t, err)
94 defer func() {
95 require.NoError(t, c.Close(ctx))
96 }()
97
98 rt, err := c.RoutingTable(ctx)
99 require.NoError(t, err)
100
101 require.Len(t, rt, int(db.config.PartitionCount))
102}
103
104func TestClusterClient_Put(t *testing.T) {
105 cluster := newTestOlricCluster(t)

Callers

nothing calls this directly

Calls 5

CloseMethod · 0.95
RoutingTableMethod · 0.95
newTestOlricClusterFunction · 0.85
NewClusterClientFunction · 0.85
addMemberMethod · 0.80

Tested by

no test coverage detected