Skip to content

Commit

Permalink
Fix scenario tests launch (#12044)
Browse files Browse the repository at this point in the history
  • Loading branch information
fexolm authored Nov 27, 2024
1 parent d6aa89c commit 3d45056
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
21 changes: 12 additions & 9 deletions ydb/tests/olap/scenario/helpers/scenario_tests_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,15 +581,18 @@ def list_path(self, path: str) -> List[ydb.SchemeEntry]:
"""

root_path = self.get_full_path('')
result = []
self_descr = YdbCluster._describe_path_impl(os.path.join(root_path, path))
if self_descr is not None:
self_descr.name = path
if self_descr.is_directory():
result = YdbCluster.list_directory(root_path, path)
result.append(self_descr)
allure.attach('\n'.join([f'{e.name}: {repr(e.type)}' for e in result]), 'result', allure.attachment_type.TEXT)
return result
try:
self_descr = YdbCluster._describe_path_impl(os.path.join(root_path, path))
except ydb.issues.SchemeError:
return []

if self_descr is None:
return []

if self_descr.is_directory():
return list(reversed(YdbCluster.list_directory(root_path, path))) + [self_descr]
else:
return self_descr

@allure.step('Remove path {path}')
def remove_path(self, path: str) -> None:
Expand Down
2 changes: 1 addition & 1 deletion ydb/tests/olap/scenario/test_scheme_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _drop_tables(self, prefix: str, count: int, ctx: TestContext):
sth.execute_scheme_query(DropTable(f'store/{prefix}_{i}'))

def scenario_create_and_drop_tables(self, ctx: TestContext):
tables_count = 100000
tables_count = 100
threads_count = 20

ScenarioTestHelper(ctx).execute_scheme_query(CreateTableStore('store').with_schema(self.schema1))
Expand Down

0 comments on commit 3d45056

Please sign in to comment.