MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / goStrings

Function goStrings

IceFireDB-PubSub/test/cmd_list_test.go:34–50  ·  view source on GitHub ↗

execute command in a go routine. Used to test blocking commands.

(t *testing.T, s *miniredis.Miniredis, args ...string)

Source from the content-addressed store, hash-verified

32
33// execute command in a go routine. Used to test blocking commands.
34func goStrings(t *testing.T, s *miniredis.Miniredis, args ...string) <-chan string {
35 c, err := proto.Dial(s.Addr())
36 ok(t, err)
37
38 got := make(chan string, 1)
39 go func() {
40 defer c.Close()
41 defer close(got)
42 res, err := c.Do(args...)
43 if err != nil {
44 t.Error(err.Error())
45 return
46 }
47 got <- res
48 }()
49 return got
50}
51
52func TestLpush(t *testing.T) {
53 server.Clear()

Callers

nothing calls this directly

Calls 6

DialFunction · 0.92
okFunction · 0.70
CloseMethod · 0.65
AddrMethod · 0.45
DoMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected