Commit be6731fa authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Rewrite this testcase with new accept and loop primitives so we can avoid

the hardcoded server port here also



git-svn-id: http://www.varnish-cache.org/svn/trunk@4368 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4d5ba564
...@@ -2,63 +2,44 @@ ...@@ -2,63 +2,44 @@
test "Test Backend Polling" test "Test Backend Polling"
server s1 -listen 127.0.0.1:9080 { server s1 {
rxreq # Probes
expect req.url == "/" loop 8 {
txresp -hdr "Bar: foo" -body "foobar" rxreq
expect req.url == "/"
txresp -hdr "Bar: foo" -body "foobar"
accept
}
loop 3 {
rxreq
expect req.url == "/"
txresp -status 404 -hdr "Bar: foo" -body "foobar"
accept
}
loop 2 {
rxreq
expect req.url == "/"
txresp -proto "FROBOZ" -status 200 -hdr "Bar: foo" -body "foobar"
accept
}
sema r1 sync 2
} -start } -start
varnish v1 -vcl { varnish v1 -vcl {
backend foo { backend foo {
.host = "127.0.0.1"; .host = "${s1_addr}";
.port = "9080"; .port = "${s1_port}";
.probe = { .probe = {
.timeout = 1 s; .timeout = 1 s;
.interval = 0.5 s; .interval = 0.1 s;
} }
} }
} -start } -start
sema r1 sync 2
# Handle probes
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 -start -wait
server s1 {
rxreq
expect req.url == "/"
txresp -status 404 -hdr "Bar: foo" -body "foobar"
} -start -wait
server s1 {
rxreq
expect req.url == "/"
txresp -status 200 -hdr "Bar: foo" -body "foobar"
} -start -wait
server s1 {
rxreq
expect req.url == "/"
txresp -proto "FROBOZ" -status 200 -hdr "Bar: foo" -body "foobar"
} -start -wait
server s1 {
} -start -wait
server s1 {
rxreq
expect req.url == "/"
delay 2
} -start -wait
delay 2
varnish v1 -cli "debug.health" varnish v1 -cli "debug.health"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment