You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ni...@apache.org on 2023/03/01 06:34:15 UTC
[ignite] branch master updated: IGNITE-18921 [ducktests] Fix consistent ID directory name (#10568)
This is an automated email from the ASF dual-hosted git repository.
nizhikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 79967354847 IGNITE-18921 [ducktests] Fix consistent ID directory name (#10568)
79967354847 is described below
commit 79967354847638c05c6fcdf280d0626a65585461
Author: Sergey Korotkov <se...@gmail.com>
AuthorDate: Wed Mar 1 13:34:06 2023 +0700
IGNITE-18921 [ducktests] Fix consistent ID directory name (#10568)
---
modules/ducktests/tests/ignitetest/services/utils/path.py | 9 ++++++++-
modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py | 4 +++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/modules/ducktests/tests/ignitetest/services/utils/path.py b/modules/ducktests/tests/ignitetest/services/utils/path.py
index 3e8f1f99ee1..cd2aac97bbb 100644
--- a/modules/ducktests/tests/ignitetest/services/utils/path.py
+++ b/modules/ducktests/tests/ignitetest/services/utils/path.py
@@ -243,13 +243,20 @@ class IgnitePathAware(PathAware, metaclass=ABCMeta):
"""
return os.path.join(self.home_dir, "bin", script_name)
+ @staticmethod
+ def consistent_dir(consistent_id):
+ """
+ :param consistent_id: consistent ID
+ :return: correct file name for consistent ID directory
+ """
+ return "".join([c if c.isdigit() or c.isalpha() else '_' for c in consistent_id])
+
def cache_dir(self, consistent_dir, cache_name):
"""
:param consistent_dir: consistent ID directory.
:param cache_name: cache name.
:return: absolute path to the cache directory.
"""
- consistent_dir = consistent_dir.replace('.', '_')
return os.path.join(self.database_dir, consistent_dir, f'cache-{cache_name}')
def index_file(self, consistent_dir, cache_name):
diff --git a/modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py b/modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py
index ca53edd25f8..18b73446a4b 100644
--- a/modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py
+++ b/modules/ducktests/tests/ignitetest/tests/index_rebuild_test.py
@@ -96,7 +96,9 @@ class IndexRebuildTest(IgniteTest):
idx_before_rebuild = get_file_sizes(ignites.nodes, ignites.index_file('*', CACHE_NAME))
for node in ignites.nodes:
- IgniteAwareService.exec_command(node, f'rm {ignites.index_file(node.account.hostname, CACHE_NAME)}')
+ IgniteAwareService.exec_command(
+ node,
+ f'rm {ignites.index_file(ignites.consistent_dir(node.account.externally_routable_ip), CACHE_NAME)}')
start_time = round(time.time() * 1000)