r4368 - trunk/varnish-cache/bin/varnishtest/tests
phk at projects.linpro.no
phk at projects.linpro.no
Wed Nov 25 10:54:19 CET 2009
Author: phk
Date: 2009-11-25 10:54:19 +0100 (Wed, 25 Nov 2009)
New Revision: 4368
Modified:
trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc
Log:
Rewrite this testcase with new accept and loop primitives so we can avoid
the hardcoded server port here also
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc 2009-11-25 09:49:15 UTC (rev 4367)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00017.vtc 2009-11-25 09:54:19 UTC (rev 4368)
@@ -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
+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"
More information about the varnish-commit
mailing list