This is an automated email from the ASF dual-hosted git repository. jlewandowski pushed a commit to branch ds-trunk-5.0--2024-07-24 in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit e885e2f0ed1508413f67fe49807b8eed24112d88 Author: Mike Adamson <madam...@datastax.com> AuthorDate: Tue Jul 12 10:06:57 2022 +0100 Star 1329 (#61) * Use converged-cassandra branch of ccm * Make sure metadata is correctly cleaned (cherry picked from commit 0e4aaec5f3c77cce1b362c98afacc7700a0a3188) (cherry picked from commit de5b64bb86fd125633cfe12c7f43cf0dcf49c3c1) (cherry picked from commit 2dd11030271d0f7e1ffd94bc8964f056a9870ce8) --- bootstrap_test.py | 13 ++++++------- replace_address_test.py | 8 +++++++- requirements.txt | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/bootstrap_test.py b/bootstrap_test.py index e9d6ac0e..ceed5a22 100644 --- a/bootstrap_test.py +++ b/bootstrap_test.py @@ -734,13 +734,7 @@ class BootstrapTester(Tester): node2.stop(wait_other_notice=False) # Wipe its data - for data_dir in node2.data_directories(): - logger.debug("Deleting {}".format(data_dir)) - shutil.rmtree(data_dir) - - commitlog_dir = os.path.join(node2.get_path(), 'commitlogs') - logger.debug("Deleting {}".format(commitlog_dir)) - shutil.rmtree(commitlog_dir) + self_cleanup(node2) # Now start it, it should be allowed to join mark = node2.mark_log() @@ -987,6 +981,11 @@ class BootstrapTester(Tester): logger.debug("Deleting {}".format(data_dir)) shutil.rmtree(data_dir) shutil.rmtree(commitlog_dir) + metadata_dir = os.path.join(node.get_path(), 'metadata') + if os.path.exists(metadata_dir): + debug("Deleting {}".format(metadata_dir)) + shutil.rmtree(metadata_dir) + @since('2.2') @pytest.mark.ported_to_in_jvm # see org.apache.cassandra.distributed.test.BootstrapBinaryDisabledTest diff --git a/replace_address_test.py b/replace_address_test.py index 9430aa21..48903228 100644 --- a/replace_address_test.py +++ b/replace_address_test.py @@ -388,6 +388,7 @@ class TestReplaceAddress(BaseReplaceAddressTest): # completely delete the data, commitlog, and saved caches for d in chain([os.path.join(node3.get_path(), "commitlogs")], [os.path.join(node3.get_path(), "saved_caches")], + [os.path.join(node3.get_path(), "metadata")], node3.data_directories()): if os.path.exists(d): rmtree(d) @@ -424,6 +425,7 @@ class TestReplaceAddress(BaseReplaceAddressTest): for d in chain([os.path.join(node3.get_path(), "commitlogs")], [os.path.join(node3.get_path(), "saved_caches")], + [os.path.join(node3.get_path(), "metadata")], node3.data_directories()): if os.path.exists(d): rmtree(d) @@ -469,7 +471,7 @@ class TestReplaceAddress(BaseReplaceAddressTest): if os.path.exists(system_data): rmtree(system_data) - for d in ['commitlogs', 'saved_caches']: + for d in ['commitlogs', 'saved_caches', 'metadata']: p = os.path.join(self.replacement_node.get_path(), d) if os.path.exists(p): rmtree(p) @@ -706,3 +708,7 @@ class TestReplaceAddress(BaseReplaceAddressTest): logger.debug("Deleting {}".format(data_dir)) rmtree(data_dir) rmtree(commitlog_dir) + metadata_dir = os.path.join(node.get_path(), 'metadata') + if os.path.exists(metadata_dir): + rmtree(metadata_dir) + diff --git a/requirements.txt b/requirements.txt index a2187d5a..df15c7d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ # # In case you want to test a patch with your own CCM branch, further to changing below CCM repo and branch name, you need to add -e flag at the beginning # Example: -e git+https://github.com/userb/ccm.git@cassandra-17182#egg=ccm -git+https://github.com/riptano/ccm.git@cassandra-test#egg=ccm +git+https://github.com/riptano/ccm.git@converged-cassandra#egg=ccm click==8.0.4 decorator==5.1.1 docopt==0.6.2 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org