You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/05/04 20:39:09 UTC

[2/4] cassandra git commit: fixup 9251 unit test

fixup 9251 unit test


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

Branch: refs/heads/trunk
Commit: 1a0262f2472450821178a4b61c0c1ecb0193f888
Parents: 369966a
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Mon May 4 19:36:25 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Mon May 4 19:36:25 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/cql3/CrcCheckChanceTest.java    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1a0262f2/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
index cc803fb..f218c9d 100644
--- a/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
+++ b/test/unit/org/apache/cassandra/cql3/CrcCheckChanceTest.java
@@ -18,12 +18,14 @@
 package org.apache.cassandra.cql3;
 
 import java.util.List;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 
 import junit.framework.Assert;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.db.ColumnFamilyStore;
 import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.db.compaction.CompactionInterruptedException;
 import org.apache.cassandra.db.compaction.CompactionManager;
 import org.apache.cassandra.utils.FBUtilities;
 
@@ -138,11 +140,18 @@ public class CrcCheckChanceTest extends CQLTester
         }
 
         DatabaseDescriptor.setCompactionThroughputMbPerSec(1);
-        List<Future<?>> futures = CompactionManager.instance.submitMaximal(cfs, CompactionManager.GC_ALL);
+        List<Future<?>> futures = CompactionManager.instance.submitMaximal(cfs, CompactionManager.GC_ALL); 
         execute("DROP TABLE %s");
 
-        FBUtilities.waitOnFutures(futures);
-
+        try
+        {
+            FBUtilities.waitOnFutures(futures);
+        }
+        catch (Throwable t)
+        {
+            if (!(t.getCause() instanceof ExecutionException) || !(t.getCause().getCause() instanceof CompactionInterruptedException))
+                throw t;
+        }
     }
 }