varnishtest "ESI: sweep through tight backend workspace conditions"

server s1 -repeat 100 {
	rxreq
	txresp -gzipbody "<html>"
} -start

varnish v1 -vcl+backend {
	import vtc;
	sub vcl_recv {
		return (pass);
	}
	sub vcl_backend_response {
		vtc.workspace_alloc(backend, -4 * (bereq.xid - 1000) / 2);
		set beresp.do_esi = true;
	}
} -start

client c1 -repeat 100 {
	txreq -url "/"
	# some responses will fail (503), some won't. All we care
	# about here is the fact that we don't panic
	rxresp
} -run
