From 92d83274d9af6081796568de928285e8321171e3 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 13 Mar 2017 18:03:02 +0100 Subject: [PATCH] fixes cache overload in the test cases (increase max count and max time of CACHE_ipToName - too many entries in mock-up preset, longer time testing) --- fail2ban/tests/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py index 7fba73c9..5f144547 100644 --- a/fail2ban/tests/utils.py +++ b/fail2ban/tests/utils.py @@ -269,7 +269,9 @@ def initTests(opts): # precache all invalid ip's (TEST-NET-1, ..., TEST-NET-3 according to RFC 5737): c = DNSUtils.CACHE_ipToName - for i in xrange(255): + # increase max count and max time (too many entries, long time testing): + c.setOptions(maxCount=10000, maxTime=5*60) + for i in xrange(256): c.set('192.0.2.%s' % i, None) c.set('198.51.100.%s' % i, None) c.set('203.0.113.%s' % i, None)