mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +03:00
Add test for reading many keys.
This commit is contained in:
@ -318,6 +318,15 @@ func (t *RedisTest) TestGetBigVal(c *C) {
|
||||
c.Assert(get.Val(), Equals, val)
|
||||
}
|
||||
|
||||
func (t *RedisTest) TestManyKeys(c *C) {
|
||||
for i := 0; i < 100000; i++ {
|
||||
t.client.Set("keys.key"+strconv.Itoa(i), "hello")
|
||||
}
|
||||
keys := t.client.Keys("keys.*")
|
||||
c.Assert(keys.Err(), IsNil)
|
||||
c.Assert(len(keys.Val()), Equals, 100000)
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
func (t *RedisTest) TestConnPoolRemovesBrokenConn(c *C) {
|
||||
|
Reference in New Issue
Block a user