From commits-return-207828-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Tue Mar 20 03:43:31 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2A7BD180647 for ; Tue, 20 Mar 2018 03:43:30 +0100 (CET) Received: (qmail 689 invoked by uid 500); 20 Mar 2018 02:43:29 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 678 invoked by uid 99); 20 Mar 2018 02:43:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2018 02:43:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 09BF7F351F; Tue, 20 Mar 2018 02:43:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: paulo@apache.org To: commits@cassandra.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: cassandra-dtest git commit: Add test for CASSANDRA-14315 Date: Tue, 20 Mar 2018 02:43:29 +0000 (UTC) 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 Authored: Thu Mar 15 15:47:02 2018 +0800 Committer: Paulo Motta 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-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org