Repository: cassandra-dtest Updated Branches: refs/heads/master 3f89310c0 -> 6edfe7fb5
Add a test that non-cdc segments are deleted after replay Test that non-cdc segment files generated in previous runs are deleted after replay. Reviewed by: Joshua McKenzie Cassandra-dtest PR # 23 Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/6edfe7fb Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/6edfe7fb Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/6edfe7fb Branch: refs/heads/master Commit: 6edfe7fb50b2d0562282b12b07aba67e95a76940 Parents: 3f89310 Author: Shichao An <shic...@uber.com> Authored: Fri Apr 6 17:07:40 2018 -0700 Committer: Philip Thompson <ptnapol...@gmail.com> Committed: Mon Apr 16 12:29:50 2018 +0200 ---------------------------------------------------------------------- cdc_test.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/6edfe7fb/cdc_test.py ---------------------------------------------------------------------- diff --git a/cdc_test.py b/cdc_test.py index ebd4050..a8efad6 100644 --- a/cdc_test.py +++ b/cdc_test.py @@ -335,6 +335,23 @@ class TestCDC(Tester): """ self._assert_cdc_data_readable_on_round_trip(start_with_cdc_enabled=False) + def test_non_cdc_segments_deleted_after_replay(self): + """ + Test that non-cdc segment files generated in previous runs are deleted + after replay. + """ + ks_name, table_name = 'ks', 'tab' + node, session = self.prepare(ks_name=ks_name, table_name=table_name, + cdc_enabled_table=True, + column_spec='a int PRIMARY KEY, b int') + old_files = _get_cdc_raw_files(node.get_path()) + node.drain() + session.cluster.shutdown() + node.stop() + node.start(wait_for_binary_proto=True) + new_files = _get_cdc_raw_files(node.get_path()) + assert len(old_files.intersection(new_files)) == 0 + def test_insertion_and_commitlog_behavior_after_reaching_cdc_total_space(self): """ Test that C* behaves correctly when CDC tables have consumed all the --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org