1
varnishtest "Test ban_lurker_sleep vs failed ban lurker"
3
# The idea here is that the ban lurker should always wait 1 second when it
4
# can't proceed, as per documentation and original intent. The
5
# ban_lurker_sleep should not affect sleep-times when the lurker fails.
15
varnish v1 -vcl+backend {
17
if (req.request == "BAN") {
18
ban("obj.http.url ~ /");
24
set beresp.http.url = req.url;
28
varnish v1 -cliok "param.set ban_lurker_sleep 0.01"
29
varnish v1 -expect n_ban_obj_test == 0
35
expect resp.status == 200
39
expect resp.status == 201
43
varnish v1 -expect n_ban_obj_test == 0
46
varnish v1 -expect n_ban_obj_test == 1
48
varnish v1 -cliok "param.set ban_lurker_sleep 5.01"
53
expect resp.status == 200
57
expect resp.status == 201
61
varnish v1 -expect n_ban_obj_test == 1
64
varnish v1 -expect n_ban_obj_test == 2