Improved thread pool tests