diff --git a/tests/common/utils.py b/tests/common/utils.py index 722298e10b7..e2f45b441c9 100644 --- a/tests/common/utils.py +++ b/tests/common/utils.py @@ -404,12 +404,14 @@ def load_csv_data( config_path = os.path.join(data_dir, 'config.yaml') with open(config_path, 'r') as f: + print(f'load config from {config_path}') config = yaml.full_load(f) space = config.get('space', None) assert space is not None if not space_name: space_name = space.get('name', "A" + space_generator()) + print(f'create space {space_name}') space_desc = SpaceDesc( name=space_name, @@ -421,17 +423,20 @@ def load_csv_data( ) create_space(space_desc, sess) + print(f'create space {space_name} successfully') schemas = config['schema'] for line in schemas.splitlines(): resp_ok(sess, line.strip(), True) + print(f'create schema successfully') # wait heartbeat_interval_secs + 1 seconds for schema synchronization time.sleep(2) + print(f'load data from {data_dir}') for fd in config["files"]: _load_data_from_file(sess, data_dir, fd) - + print(f'load data successfully') return space_desc @@ -441,6 +446,9 @@ def get_conn_pool(host: str, port: int): config.timeout = 180000 # init connection pool pool = ConnectionPool() + print("get pool") if not pool.init([(host, port)], config): raise Exception("Fail to init connection pool.") + + print("pool init") return pool diff --git a/tests/nebula-test-run.py b/tests/nebula-test-run.py index 2a89ed249d2..8753b4bc0b2 100755 --- a/tests/nebula-test-run.py +++ b/tests/nebula-test-run.py @@ -102,6 +102,7 @@ def start_nebula(nb, configs): # Load csv data pool = get_conn_pool(address, ports[0]) sess = pool.get_session(configs.user, configs.password) + print('get session') if not os.path.exists(TMP_DIR): os.mkdir(TMP_DIR) @@ -113,9 +114,13 @@ def start_nebula(nb, configs): if not os.path.exists(os.path.join(folder, space, "config.yaml")): continue data_dir = os.path.join(folder, space) + print('load csv data') space_desc = load_csv_data(sess, data_dir, space) + print('load csv data done') spaces.append(space_desc.__dict__) + print(space) f.write(json.dumps(spaces)) + print('SPACE_TMP_PATH') with open(NB_TMP_PATH, "w") as f: data = {