[master] 10871f4 Make this test much more robust with respect to timing

Poul-Henning Kamp phk at FreeBSD.org
Wed Feb 25 20:17:17 CET 2015


commit 10871f41d02334b3f853c9941ec334ddf5859d2b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 25 19:17:02 2015 +0000

    Make this test much more robust with respect to timing

diff --git a/bin/varnishtest/tests/v00014.vtc b/bin/varnishtest/tests/v00014.vtc
index c4926e0..ac690ce 100644
--- a/bin/varnishtest/tests/v00014.vtc
+++ b/bin/varnishtest/tests/v00014.vtc
@@ -2,8 +2,17 @@ varnishtest "Check req.backend.healthy"
 
 server s1 {
 	rxreq
+	sema r1 sync 2
 	expect req.url == "/"
 	txresp -body "slash"
+	accept
+	rxreq
+	sema r2 sync 2
+	sema r3 sync 2
+	expect req.url == "/"
+	txresp -body "slash"
+	accept
+	sema r4 sync 2
 } -start
 
 varnish v1 -vcl {
@@ -35,28 +44,23 @@ varnish v1 -vcl {
 	}
 } -start
 
+varnish v1 -cliok "backend.list" -cliok "debug.health"
+
 client c1 {
 	txreq
 	rxresp
 	expect resp.status == 500
-} -run
 
-server s1 -wait
+	sema r1 sync 2
 
-server s1 {
-	rxreq
-	expect req.url == "/"
-	txresp -body "slash"
-} -start -wait
-
-server s1 {
-	rxreq
-	expect req.url == "/foo"
-	txresp -body "foobar"
-} -start
+	sema r2 sync 2
+	txreq
+	rxresp
+	expect resp.status == 500
 
-client c1 {
-	txreq -url "/foo"
+	sema r3 sync 2
+	sema r4 sync 2
+	txreq 
 	rxresp
 	expect resp.status == 200
 } -run



More information about the varnish-commit mailing list