Fix for precaching RL rules

This commit is contained in:
DanB
2016-08-18 21:15:41 +02:00
parent e5fab0e6d0
commit 987d26c20b
2 changed files with 20 additions and 0 deletions

View File

@@ -183,6 +183,14 @@ func (rs *RedisStorage) PreloadCacheForPrefix(prefix string) error {
return err
}
}
case utils.ResourceLimitsPrefix:
for _, key := range keyList {
_, err = rs.GetResourceLimit(key[len(utils.ResourceLimitsPrefix):], true)
if err != nil {
cache2go.RollbackTransaction()
return err
}
}
default:
return utils.ErrInvalidKey
}

View File

@@ -202,6 +202,18 @@ func TestRPCITDirectedRPC(t *testing.T) {
}
}
func TestRPCITTimeout(t *testing.T) {
if !*testIntegration {
return
}
var status map[string]interface{}
if err := rpcPoolFirst.Call("Responder.Status", "3s", &status); err == nil {
t.Error("Expecting timeout")
} else {
t.Error(err)
}
}
// Special tests involving remote server (manually set)
// The server network will be manually disconnected without TCP close
func TestRPCITRmtRpcConnPool(t *testing.T) {