[master] e0c5201f9 vtc: Align c93 with c69

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jun 28 09:59:06 UTC 2021


commit e0c5201f947ab27619098ab2d14dc5e4e0c57020
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Jun 28 11:56:33 2021 +0200

    vtc: Align c93 with c69

diff --git a/bin/varnishtest/tests/c00069.vtc b/bin/varnishtest/tests/c00069.vtc
index 3f91696a6..9aefaf4ea 100644
--- a/bin/varnishtest/tests/c00069.vtc
+++ b/bin/varnishtest/tests/c00069.vtc
@@ -13,7 +13,6 @@ server s1 {
 
 varnish v1 -vcl+backend {
 	import vtc;
-
 	sub vcl_recv {
 		if (req.url == "/synth") {
 			return(synth(200, "OK"));
diff --git a/bin/varnishtest/tests/c00093.vtc b/bin/varnishtest/tests/c00093.vtc
index 9b8899dd3..0fa9aa2bd 100644
--- a/bin/varnishtest/tests/c00093.vtc
+++ b/bin/varnishtest/tests/c00093.vtc
@@ -1,34 +1,34 @@
 varnishtest "Test resp.is_streaming with a UDS backend"
 
+# Same as c00069 without the synth case
+
 barrier b1 sock 2
+barrier b2 sock 2
 
 server s1 -listen "${tmpdir}/s1.sock" {
 	rxreq
 	txresp -nolen -hdr "Content-Length: 10"
 	barrier b1 sync
+	barrier b2 sync
 	send "1234567890"
 } -start
 
 varnish v1 -vcl+backend {
 	import vtc;
-	sub vcl_recv {
-		if (req.url == "/synth") {
-			return(synth(200, "OK"));
-		}
-	}
-	sub vcl_synth {
-		set resp.http.streaming = resp.is_streaming;
+	sub vcl_backend_response {
+		vtc.barrier_sync("${b1_sock}");
+		return (deliver);
 	}
 	sub vcl_deliver {
 		set resp.http.streaming = resp.is_streaming;
-		if (req.http.barrier) {
-			vtc.barrier_sync(req.http.barrier);
+		if (obj.hits == 0) {
+			vtc.barrier_sync("${b2_sock}");
 		}
 	}
 } -start
 
 client c1 {
-	txreq -hdr "barrier: ${b1_sock}"
+	txreq
 	rxresp
 	expect resp.http.streaming == "true"
 
@@ -37,9 +37,4 @@ client c1 {
 	txreq
 	rxresp
 	expect resp.http.streaming == "false"
-
-	txreq -url /synth
-	rxresp
-	expect resp.http.streaming == "false"
 } -run
-


More information about the varnish-commit mailing list