MCPcopy Index your code
hub / github.com/CodisLabs/codis / verifySlots

Function verifySlots

pkg/proxy/proxy_test.go:62–76  ·  view source on GitHub ↗
(c *ApiClient, expect map[int]*models.Slot)

Source from the content-addressed store, hash-verified

60}
61
62func verifySlots(c *ApiClient, expect map[int]*models.Slot) {
63 slots, err := c.Slots()
64 assert.MustNoError(err)
65
66 assert.Must(len(slots) == models.MaxSlotNum)
67
68 for i, slot := range expect {
69 if slot != nil {
70 assert.Must(slots[i].Id == i)
71 assert.Must(slot.Locked == slots[i].Locked)
72 assert.Must(slot.BackendAddr == slots[i].BackendAddr)
73 assert.Must(slot.MigrateFrom == slots[i].MigrateFrom)
74 }
75 }
76}
77
78func TestFillSlot(x *testing.T) {
79 s, addr := openProxy()

Callers 2

TestFillSlotFunction · 0.85
TestStartAndShutdownFunction · 0.85

Calls 1

SlotsMethod · 0.45

Tested by

no test coverage detected