Improve connection tests