diff --git a/database/gredis/gredis_z_unit_test.go b/database/gredis/gredis_z_unit_test.go index 2671fbc97..3e9645121 100644 --- a/database/gredis/gredis_z_unit_test.go +++ b/database/gredis/gredis_z_unit_test.go @@ -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")