Add graceful shutdown wait test.