Skip to content

Instantly share code, notes, and snippets.

@rezan
Created July 6, 2020 18:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
varnishscoreboard vcl_recv
varnishtest "varnishscoreboard vcl_recv"
barrier b1 sock 2
barrier b2 sock 2
server s1 {
} -start
varnish v1 -cliok "param.set thread_pool_track on" -vcl+backend {
import vtc;
sub vcl_recv {
vtc.barrier_sync("${b1_sock}");
vtc.barrier_sync("${b2_sock}");
return (synth(200));
}
} -start
client c1 {
txreq -url /123 -hdr "Host: hostname"
rxresp
} -start
barrier b1 sync
shell -match "client +recv.+GET hostname /123" {
varnishscoreboard -n ${v1_name}
}
barrier b2 sync
client c1 -wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment