1
0
mirror of https://github.com/redis/go-redis.git synced 2025-08-08 23:42:06 +03:00

fix test error

Signed-off-by: monkey <golang@88.com>
This commit is contained in:
monkey
2021-03-12 19:06:11 +08:00
parent 250f81bf06
commit af3827aeab
5 changed files with 46 additions and 6 deletions

View File

@@ -308,7 +308,8 @@ var _ = Describe("races", func() {
Streams: []string{"test", "$"},
Block: 1 * time.Second,
}).Result()
Expect(err).To(Equal(context.Canceled))
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(Or(Equal(context.Canceled.Error()), ContainSubstring("operation was canceled")))
})
time.Sleep(10 * time.Millisecond)