Fix NeverPurgeTest - wait for compactions to finish

Patch by marcuse; reviewed by Stefania for CASSANDRA-12841


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/bd540bc5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/bd540bc5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/bd540bc5

Branch: refs/heads/trunk
Commit: bd540bc51fa4d308a23a0f67ec9d65ebeeb72ee5
Parents: cba5c7f
Author: Marcus Eriksson <marc...@apache.org>
Authored: Wed Nov 9 09:46:53 2016 +0100
Committer: Marcus Eriksson <marc...@apache.org>
Committed: Wed Apr 26 09:36:32 2017 +0200

----------------------------------------------------------------------
 test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bd540bc5/test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java 
b/test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java
index 5211065..362afe7 100644
--- a/test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/NeverPurgeTest.java
@@ -80,7 +80,7 @@ public class NeverPurgeTest extends CQLTester
         execute("DELETE FROM %s WHERE a=3");
         cfs.forceBlockingFlush();
         cfs.enableAutoCompaction();
-        while (cfs.getSSTables().size() > 1)
+        while (cfs.getSSTables().size() > 1 || 
!cfs.getTracker().getCompacting().isEmpty())
             Thread.sleep(100);
         verifyContainsTombstones(cfs.getSSTables(), 3);
     }

Reply via email to