mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-10 03:47:42 +02:00
Make sure that we don't randomly fail the pylib ratelimiting tests.
git-svn-id: file:///svn/unbound/trunk@4829 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Vendored
+2
@@ -75,6 +75,7 @@ def test_ratelimit_fg_on(ctx):
|
||||
|
||||
"""
|
||||
ctx.set_option("ratelimit:", "1")
|
||||
ctx.set_option("ratelimit-factor:", "0")
|
||||
status, result = ctx.resolve(qname, qtype, qclass)
|
||||
if status == 0 and result.was_ratelimited:
|
||||
print("Ratelimit-fg-on: pass")
|
||||
@@ -100,6 +101,7 @@ def test_ratelimit_bg_on(ctx):
|
||||
|
||||
"""
|
||||
ctx.set_option("ratelimit:", "1")
|
||||
ctx.set_option("ratelimit-factor:", "0")
|
||||
cb_data = dict(done=False)
|
||||
retval, async_id = ctx.resolve_async(qname, cb_data, callback, qtype, qclass)
|
||||
while retval == 0 and not cb_data['done']:
|
||||
|
||||
Reference in New Issue
Block a user