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 @@
test "Test Backend Polling"
server s1 -listen 127.0.0.1:9080 {
rxreq
expect req.url == "/"
txresp -hdr "Bar: foo" -body "foobar"
server s1 {
# Probes
loop 8 {
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
varnish v1 -vcl {
backend foo {
.host = "127.0.0.1";
.port = "9080";
.host = "${s1_addr}";
.port = "${s1_port}";
.probe = {
.timeout = 1 s;
.interval = 0.5 s;
.interval = 0.1 s;
}
}
} -start
# 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
sema r1 sync 2
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