varnishtest "Memory pool gymnastics"

server s1 { } -start

varnish v1 -vcl+backend {} -start

delay 2

varnish v1 -expect MEMPOOL.req0.pool == 10

varnish v1 -cliok "param.set pool_req 90,100,100"

delay 2

varnish v1 -expect MEMPOOL.req0.pool == 90

varnish v1 -cliok "param.set pool_req 50,80,100"

delay 2

varnish v1 -expect MEMPOOL.req0.pool == 80
varnish v1 -expect MEMPOOL.req0.surplus == 10

varnish v1 -cliok "param.set pool_req 10,80,1"

delay 2

varnish v1 -expect MEMPOOL.req0.pool == 10
varnish v1 -expect MEMPOOL.req0.timeout == 70
