Skip to content

Commit 6a48fe0

Browse files
committed
Fix build
1 parent d83d451 commit 6a48fe0

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

commands_test.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ var _ = Describe("Commands", func() {
3333
pipe.Auth("")
3434
return nil
3535
})
36-
Expect(err).To(MatchError("ERR Client sent AUTH, but no password is set"))
37-
Expect(cmds[0].Err()).To(MatchError("ERR Client sent AUTH, but no password is set"))
38-
Expect(cmds[1].Err()).To(MatchError("ERR Client sent AUTH, but no password is set"))
36+
Expect(err).To(HaveOccurred())
37+
Expect(err.Error()).To(ContainSubstring("ERR AUTH"))
38+
Expect(cmds[0].Err().Error()).To(ContainSubstring("ERR AUTH"))
39+
Expect(cmds[1].Err().Error()).To(ContainSubstring("ERR AUTH"))
3940

4041
stats := client.PoolStats()
4142
Expect(stats.Hits).To(Equal(uint32(1)))

race_test.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,17 @@ var _ = Describe("races", func() {
261261
Expect(n).To(Equal(int64(N)))
262262
})
263263

264-
It("should BLPop", func() {
264+
PIt("should BLPop", func() {
265265
var received uint32
266+
266267
wg := performAsync(C, func(id int) {
267268
for {
268269
v, err := client.BLPop(3*time.Second, "list").Result()
269270
if err != nil {
270-
break
271+
if err == redis.Nil {
272+
break
273+
}
274+
Expect(err).NotTo(HaveOccurred())
271275
}
272276
Expect(v).To(Equal([]string{"list", "hello"}))
273277
atomic.AddUint32(&received, 1)
@@ -282,7 +286,7 @@ var _ = Describe("races", func() {
282286
})
283287

284288
wg.Wait()
285-
Expect(received).To(Equal(uint32(C * N)))
289+
Expect(atomic.LoadUint32(&received)).To(Equal(uint32(C * N)))
286290
})
287291

288292
It("should WithContext", func() {

ring_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ var _ = Describe("Redis Ring", func() {
206206
ring = redis.NewRing(opts)
207207

208208
err := ring.Ping().Err()
209-
Expect(err).To(MatchError("ERR Client sent AUTH, but no password is set"))
209+
Expect(err).To(HaveOccurred())
210+
Expect(err.Error()).To(ContainSubstring("ERR AUTH"))
210211
})
211212
})
212213

0 commit comments

Comments
 (0)