Catch ConnectionError exception when CH server unavailabe

Change-Id: Idbec6eafd56dea2fc92a5fb7c3bee58c46c00148
This commit is contained in:
Chi Lo 2020-09-08 13:29:32 -07:00
parent 6587fd6efe
commit 37ea690c81

View File

@ -93,8 +93,9 @@ class BaseOrmTest(test.BaseTestCase):
"Test skipped, Ranger region unavailable") from e
except Exception as exp:
if "No route to host" in str(exp):
skip_msg = "Tests skipped, Ranger not available"
if "ConnectionError" in str(exp):
skip_msg = "Tests skipped, Ranger unavailable: {}".format(
str(exp))
raise cls.skipException(skip_msg)
raise exp