mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
improve UT for package gredis
This commit is contained in:
@ -168,9 +168,13 @@ func Test_Error(t *testing.T) {
|
||||
_, err = conn.Do(ctx, "Subscribe", "gf")
|
||||
t.AssertNil(err)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
_, err = redis.Do(ctx, "PUBLISH", "gf", "test")
|
||||
t.AssertNil(err)
|
||||
|
||||
time.Sleep(time.Second)
|
||||
|
||||
v, err = conn.Receive(ctx)
|
||||
t.AssertNil(err)
|
||||
t.Assert(v.Val().(*gredis.Subscription).Channel, "gf")
|
||||
|
||||
Reference in New Issue
Block a user