Stabilize test

parent f65f7148
varnishtest "Test resp.is_streaming" varnishtest "Test resp.is_streaming"
barrier b1 sock 2
barrier b2 sock 2
server s1 { server s1 {
rxreq rxreq
txresp -nolen -hdr "Content-Length: 10" txresp -nolen -hdr "Content-Length: 10"
delay 1 barrier b1 sync
barrier b2 sync
send "1234567890" send "1234567890"
} -start } -start
varnish v1 -vcl+backend { varnish v1 -vcl+backend {
import vtc;
sub vcl_recv { sub vcl_recv {
if (req.url == "/synth") { if (req.url == "/synth") {
return(synth(200, "OK")); return(synth(200, "OK"));
} }
} }
sub vcl_backend_response {
vtc.barrier_sync("${b1_sock}");
return (deliver);
}
sub vcl_synth { sub vcl_synth {
set resp.http.streaming = resp.is_streaming; set resp.http.streaming = resp.is_streaming;
} }
sub vcl_deliver { sub vcl_deliver {
if (obj.hits == 0) {
vtc.barrier_sync("${b2_sock}");
}
set resp.http.streaming = resp.is_streaming; set resp.http.streaming = resp.is_streaming;
} }
} -start } -start
...@@ -36,4 +49,3 @@ client c1 { ...@@ -36,4 +49,3 @@ client c1 {
rxresp rxresp
expect resp.http.streaming == "false" expect resp.http.streaming == "false"
} -run } -run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment