Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
xunliu committed Dec 11, 2024
1 parent af8bcc8 commit b8d2db2
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def setUpClass(cls):
# append the hadoop conf to server
cls._append_conf(cls.config, cls.oauth2_conf_path)

IntegrationTestEnv.restart_server()
IntegrationTestEnv.exec_gravitino("restart")
cls.oauth2_token_provider = DefaultOAuth2TokenProvider(
f"{cls.oauth2_server_uri}", "test:test", "test", "oauth2/token"
)
Expand All @@ -95,7 +95,7 @@ def tearDownClass(cls):
# reset server conf
cls._reset_conf(cls.config, cls.oauth2_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")
finally:
# close oauth2 container
cls.oauth2_container.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def exec_gravitino(cls, *args):
logger.info("stdout: %s", result.stdout)
if result.stderr:
logger.info("stderr: %s", result.stderr)
check_gravitino_server_status()

@classmethod
def tearDownClass(cls):
Expand All @@ -140,11 +141,6 @@ def tearDownClass(cls):
if gravitino_server_running:
logger.error("Can't stop Gravitino server!")

@classmethod
def restart_server(cls):
logger.info("Restarting Gravitino server...")
cls.exec_gravitino("restart")

@classmethod
def _get_gravitino_home(cls):
gravitino_home = os.environ.get("GRAVITINO_HOME")
Expand Down
4 changes: 2 additions & 2 deletions clients/client-python/tests/integration/test_gvfs_with_abs.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def setUpClass(cls):

cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"
# restart the server
cls.restart_server()
cls.exec_gravitino("restart")
# create entity
cls._init_test_entities()

Expand All @@ -82,7 +82,7 @@ def tearDownClass(cls):
# to reset it
cls._reset_conf(cls.config, cls.hadoop_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")

# clear all config in the conf_path
@classmethod
Expand Down
4 changes: 2 additions & 2 deletions clients/client-python/tests/integration/test_gvfs_with_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def setUpClass(cls):

cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"
# restart the server
cls.restart_server()
cls.exec_gravitino("restart")
# create entity
cls._init_test_entities()

Expand All @@ -77,7 +77,7 @@ def tearDownClass(cls):
# to reset it
cls._reset_conf(cls.config, cls.hadoop_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")

# clear all config in the conf_path
@classmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def setUpClass(cls):
# append the hadoop conf to server
cls._append_conf(cls.config, cls.hadoop_conf_path)
# restart the server
cls.restart_server()
cls.exec_gravitino("restart")
cls.gravitino_admin_client = GravitinoAdminClient(uri="http://localhost:8090")
# create entity
cls._init_test_entities()
Expand All @@ -117,7 +117,7 @@ def tearDownClass(cls):
# reset server conf
cls._reset_conf(cls.config, cls.hadoop_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")
# clear hadoop env
BaseHadoopEnvironment.clear_hadoop_env()
finally:
Expand Down
4 changes: 2 additions & 2 deletions clients/client-python/tests/integration/test_gvfs_with_oss.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def setUpClass(cls):

cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"
# restart the server
cls.restart_server()
cls.exec_gravitino("restart")
# create entity
cls._init_test_entities()

Expand All @@ -85,7 +85,7 @@ def tearDownClass(cls):
# to reset it
cls._reset_conf(cls.config, cls.hadoop_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")

# clear all config in the conf_path
@classmethod
Expand Down
4 changes: 2 additions & 2 deletions clients/client-python/tests/integration/test_gvfs_with_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def setUpClass(cls):

cls.hadoop_conf_path = f"{cls.gravitino_home}/catalogs/hadoop/conf/hadoop.conf"
# restart the server
cls.restart_server()
cls.exec_gravitino("restart")
# create entity
cls._init_test_entities()

Expand All @@ -84,7 +84,7 @@ def tearDownClass(cls):
# to reset it
cls._reset_conf(cls.config, cls.hadoop_conf_path)
# restart server
cls.restart_server()
cls.exec_gravitino("restart")

# clear all config in the conf_path
@classmethod
Expand Down

0 comments on commit b8d2db2

Please sign in to comment.