Fix healthz test error handling
Merge pull request #2130 from claire921/refactor_healthz_test

Fix healthz test error handling