core/apiRouter: don't wait for graceful HTTP shutdown in test mode