improve UT for package gredis

This commit is contained in:
John Guo
2022-06-16 17:41:15 +08:00
parent cdd4473df5
commit 8ac177a6de

View File

@ -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")