Repository: cassandra-dtest Updated Branches: refs/heads/master 1888c4048 -> 2c1b986bc
Add test for CASSANDRA-14315 Patch by Zhao Yang; Reviewed by Paulo motta for CASSANDRA-14315 Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/2c1b986b Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/2c1b986b Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/2c1b986b Branch: refs/heads/master Commit: 2c1b986bc82ad29a4db06158043aceaaf473e17c Parents: 1888c40 Author: Zhao Yang <zhaoyangsingap...@gmail.com> Authored: Thu Mar 15 15:47:02 2018 +0800 Committer: Paulo Motta <pa...@apache.org> Committed: Mon Mar 19 23:40:58 2018 -0300 ---------------------------------------------------------------------- materialized_views_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/2c1b986b/materialized_views_test.py ---------------------------------------------------------------------- diff --git a/materialized_views_test.py b/materialized_views_test.py index a723c4f..7771f9d 100644 --- a/materialized_views_test.py +++ b/materialized_views_test.py @@ -2084,6 +2084,8 @@ class TestMaterializedViews(Tester): # partition deletion for ck1 <= partition_deletion_ts session.execute("DELETE FROM ks.t USING TIMESTAMP {} WHERE pk=1".format(partition_deletion_ts)) + # only partition deletion for the pk=2000 + session.execute("DELETE FROM ks.t USING TIMESTAMP {} WHERE pk=2000".format(partition_deletion_ts)) self._replay_batchlogs() # start nodes with different batch size @@ -2096,6 +2098,9 @@ class TestMaterializedViews(Tester): logger.debug('repairing base table') node1.nodetool("repair ks t") + # insert data to the deleted partition with pk=2000, they should be considered dead + session.execute("INSERT INTO ks.t (pk, ck1, ck2, v1, v2)" + " VALUES (2000, 0, 0, 0, 0) USING TIMESTAMP {}".format(partition_deletion_ts - 1)) self._replay_batchlogs() logger.debug('stop cluster') @@ -2127,6 +2132,9 @@ class TestMaterializedViews(Tester): "ck1={} AND ck2={}".format(ck1, ck2), [1, ck1, ck2, ck1, ck2]) assert_one(session, "SELECT pk,ck1,ck2,v1,v2 FROM ks.t WHERE pk=1 AND " "ck1={} AND ck2={}".format(ck1, ck2), [1, ck1, ck2, ck1, ck2]) + # Verify partition deletion with pk=2000 has no live data + assert_none(session, "SELECT pk,ck1,ck2,v1,v2 FROM ks.t WHERE pk=2000") + assert_none(session, "SELECT pk,ck1,ck2,v1,v2 FROM ks.t_by_v WHERE pk=2000") logger.debug('stopping {}'.format(node.name)) node.stop(wait_other_notice=True, wait_for_binary_proto=True) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org