vtest "Explain how param.(re)?set may fail"

# NB: we don't need or want to start the cache process

vinyl v1 -cliok "param.set thread_pool_max 10000"
vinyl v1 -cliok "param.set thread_pool_min  8000"

# NB: "vinyl v1 -cliexpect" wouldn't work with a non-200 status
shell -err -expect "Must be at least 8000 (thread_pool_min)" {
	exec vinyladm -n ${v1_name} param.reset thread_pool_max
}

vinyl v1 -cliok "param.set thread_pool_min  8"
vinyl v1 -cliok "param.set thread_pool_max 10"

shell -err -expect "Must be no more than 10 (thread_pool_max)" {
	exec vinyladm -n ${v1_name} param.reset thread_pool_min
}

vinyl v1 -cliok "param.reset thread_pool_max"
vinyl v1 -cliok "param.reset thread_pool_min"

shell -err -expect "Must be no more than 95 (95% of thread_pool_min)" {
	exec vinyladm -n ${v1_name} param.set thread_pool_reserve 96
}
