Be slightly more resilient when testing for server shutdown and startup