[master] 97afc52e4 vtc: Stabilize c93

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Sun Jun 27 11:46:05 UTC 2021


commit 97afc52e40157be7e0692ccf53bcc467e0d26339
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Sun Jun 27 13:28:16 2021 +0200

    vtc: Stabilize c93
    
    On a loaded system the delay may not be enough, a barrier should.

diff --git a/bin/varnishtest/tests/c00093.vtc b/bin/varnishtest/tests/c00093.vtc
index 625dc3d11..9b8899dd3 100644
--- a/bin/varnishtest/tests/c00093.vtc
+++ b/bin/varnishtest/tests/c00093.vtc
@@ -1,13 +1,16 @@
 varnishtest "Test resp.is_streaming with a UDS backend"
 
+barrier b1 sock 2
+
 server s1 -listen "${tmpdir}/s1.sock" {
 	rxreq
 	txresp -nolen -hdr "Content-Length: 10"
-	delay 1
+	barrier b1 sync
 	send "1234567890"
 } -start
 
 varnish v1 -vcl+backend {
+	import vtc;
 	sub vcl_recv {
 		if (req.url == "/synth") {
 			return(synth(200, "OK"));
@@ -18,11 +21,14 @@ varnish v1 -vcl+backend {
 	}
 	sub vcl_deliver {
 		set resp.http.streaming = resp.is_streaming;
+		if (req.http.barrier) {
+			vtc.barrier_sync(req.http.barrier);
+		}
 	}
 } -start
 
 client c1 {
-	txreq
+	txreq -hdr "barrier: ${b1_sock}"
 	rxresp
 	expect resp.http.streaming == "true"
 


More information about the varnish-commit mailing list