Add a fellowized test case for the previous two commits

parent 2835cb61
......@@ -145,6 +145,7 @@ TESTS = \
vtc/fellow_global.vtc \
vtc/fellow_global_shared.vtc \
vtc/fellow_coverage.vtc \
vtc/fellow_c00093.vtc \
vtc/fellow_t02005.vtc \
vtc/vut_slashmap.vtc \
vtc/loadmasters.vtc
......
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: 65536"
barrier b1 sync
barrier b2 sync
delay .5
send_n 128 "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
delay .5
send_n 128 "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
} -start
varnish v1 \
-arg "-E${libvmod_slash}" \
-arg "-sfellow=fellow,${tmpdir}/fellow_global.stv,100MB,1MB,64KB" \
-vcl+backend {
import vtc;
import slash;
sub vcl_init {
slash.tune_fellow(storage.fellow, chunk_exponent=12);
}
sub vcl_backend_response {
vtc.barrier_sync("${b1_sock}");
return (deliver);
}
sub vcl_deliver {
set resp.http.streaming = resp.is_streaming;
if (obj.hits == 0) {
vtc.barrier_sync("${b2_sock}");
}
}
} -start
logexpect l1 -v v1 -q "Begin ~ bereq" -i End {
expect 0 1002 End
} -start
client c1 {
txreq
rxresp
expect resp.http.streaming == true
expect resp.bodylen == 65536
} -run
logexpect l1 -wait
delay .5
client c2 {
txreq
rxresp
expect resp.http.streaming == false
expect resp.bodylen == 65536
} -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