r5414 - trunk/varnish-cache/bin/varnishtest/tests

phk at varnish-cache.org phk at varnish-cache.org
Tue Oct 5 21:35:44 CEST 2010


Author: phk
Date: 2010-10-05 21:35:42 +0200 (Tue, 05 Oct 2010)
New Revision: 5414

Modified:
   trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc
Log:
Use semaphores instead of delays to get the timing right here.



Modified: trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc	2010-10-05 19:35:16 UTC (rev 5413)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc	2010-10-05 19:35:42 UTC (rev 5414)
@@ -6,24 +6,26 @@
 	rxreq
 	expect req.url == "/foo"
 	send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
-	delay .5
+	sema r1 sync 2
 	send "line1\n"
-	delay .5
+	sema r1 sync 2
 	send "line2\n"
 } -start
 
 varnish v1 -vcl+backend { } -start
 
 client c1 {
-	txreq -url "/foo"
+	txreq -url "/foo" -hdr "client: c1"
 	rxresp
 	expect resp.status == 200
 	expect resp.http.content-length == 12
 	expect resp.http.x-varnish == "1001"
 } -start
-delay .2
+
 client c2 {
-	txreq -url "/foo"
+	sema r1 sync 2
+	txreq -url "/foo" -hdr "client: c2"
+	sema r1 sync 2
 	rxresp
 	expect resp.status == 200
 	expect resp.http.content-length == 12




More information about the varnish-commit mailing list