Check every req for error.

This commit is contained in:
Vladimir Mihailenco 2012-08-06 15:45:38 +03:00
parent 05223145e0
commit 1d3a223419
1 changed files with 10 additions and 0 deletions

View File

@ -1835,6 +1835,11 @@ func (t *RedisTest) TestIncrPipeliningFromGoroutines(c *C) {
reqs, err := multiClient.RunQueued() reqs, err := multiClient.RunQueued()
c.Check(err, IsNil) c.Check(err, IsNil)
c.Check(reqs, HasLen, 20000) c.Check(reqs, HasLen, 20000)
for _, req := range reqs {
if req.Err() != nil {
c.Errorf("got %v, expected nil", req.Err())
}
}
get := t.client.Get("TestIncrPipeliningFromGoroutinesKey") get := t.client.Get("TestIncrPipeliningFromGoroutinesKey")
c.Check(get.Err(), IsNil) c.Check(get.Err(), IsNil)
@ -1857,6 +1862,11 @@ func (t *RedisTest) TestIncrTransaction(c *C) {
reqs, err := multiClient.Exec() reqs, err := multiClient.Exec()
c.Check(err, IsNil) c.Check(err, IsNil)
c.Check(reqs, HasLen, 20000) c.Check(reqs, HasLen, 20000)
for _, req := range reqs {
if req.Err() != nil {
c.Errorf("got %v, expected nil", req.Err())
}
}
get := t.client.Get("TestIncrTransactionKey") get := t.client.Get("TestIncrTransactionKey")
c.Check(get.Err(), IsNil) c.Check(get.Err(), IsNil)