varnishtest "Deconfigure thread pool"

# First with default waiter

server s1 {
	rxreq
	txresp
} -start

varnish v1 -vcl+backend {} -start

varnish v1 -cliok "param.set experimental +drop_pools"
varnish v1 -cliok "param.set debug +slow_acceptor"
varnish v1 -cliok "param.set thread_pools 1"

delay 2

client c1 -repeat 2 {
	txreq
	rxresp
} -run

delay 2

varnish v1 -vsc *thr*
varnish v1 -vsc *poo*
varnish v1 -expect MAIN.pools == 1

client c1 {
	txreq
	rxresp
} -run

# Then with poll waiter

server s1 {
	rxreq
	txresp
} -start

varnish v2 -arg "-Wpoll" -vcl+backend {} -start

varnish v2 -cliok "param.set experimental +drop_pools"
varnish v2 -cliok "param.set debug +slow_acceptor"
varnish v2 -cliok "param.set thread_pools 1"

delay 2

client c2 -connect ${v2_sock} -repeat 2 {
	txreq
	rxresp
} -run

delay 2

varnish v2 -vsc *thr*
varnish v2 -vsc *poo*
varnish v2 -expect MAIN.pools == 1

client c2 -connect ${v2_sock} {
	txreq
	rxresp
} -run
