Copilot commented on code in PR #11977:
URL: https://github.com/apache/gravitino/pull/11977#discussion_r3568624068
##########
clients/client-python/tests/integration/integration_test_env.py:
##########
@@ -67,15 +67,18 @@ class IntegrationTestEnv(unittest.TestCase):
gravitino_startup_script = None
gravitino_admin_client: GravitinoAdminClient = None
+ @staticmethod
+ def use_external_gravitino() -> bool:
+ return os.environ.get("START_EXTERNAL_GRAVITINO", "").lower() == "true"
+
@classmethod
def setUpClass(cls):
- if (
- os.environ.get("START_EXTERNAL_GRAVITINO") is not None
- and os.environ.get("START_EXTERNAL_GRAVITINO").lower() == "true"
- ):
+ if cls.use_external_gravitino():
# Maybe Gravitino server already startup by Gradle test command or
developer manual startup.
if not check_gravitino_server_status():
- logger.error("ERROR: Can't find online Gravitino server!")
+ raise GravitinoRuntimeException(
+ "ERROR: Can't find online Gravitino server!"
+ )
Review Comment:
The exception message includes a redundant "ERROR:" prefix and is a bit
unclear about what endpoint was checked. Since this is surfaced to test
runners, consider using a concise message that states the expected server
address and that START_EXTERNAL_GRAVITINO was enabled.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]