cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bened...@apache.org
Subject [1/5] cassandra git commit: fixup burn test compilation
Date Tue, 30 Jun 2015 12:23:18 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 c1e7643aa -> 589273214
  refs/heads/trunk 356684350 -> 543efe924


fixup burn test compilation


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

Branch: refs/heads/cassandra-2.2
Commit: b6dd6b48dba7baa82bed9a7b8514e18bd8b3b942
Parents: fe65707
Author: Benedict Elliott Smith <benedict@apache.org>
Authored: Tue Jun 30 13:21:36 2015 +0100
Committer: Benedict Elliott Smith <benedict@apache.org>
Committed: Tue Jun 30 13:21:36 2015 +0100

----------------------------------------------------------------------
 .../concurrent/LongSharedExecutorPoolTest.java  |  2 +-
 .../apache/cassandra/utils/LongBTreeTest.java   | 47 --------------------
 2 files changed, 1 insertion(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6dd6b48/test/burn/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
----------------------------------------------------------------------
diff --git a/test/burn/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java b/test/burn/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
index fe464c7..3453261 100644
--- a/test/burn/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
+++ b/test/burn/org/apache/cassandra/concurrent/LongSharedExecutorPoolTest.java
@@ -116,7 +116,7 @@ public class LongSharedExecutorPoolTest
         final ExecutorService[] executors = new ExecutorService[executorCount];
         for (int i = 0 ; i < executors.length ; i++)
         {
-            executors[i] = SharedExecutorPool.SHARED.newExecutor(threadCount, maxQueued,
"test" + i, "test" + i);
+            executors[i] = JMXEnabledSharedExecutorPool.SHARED.newExecutor(threadCount, maxQueued,
"test" + i, "test" + i);
             threadCounts[i] = threadCount;
             workCount[i] = new WeibullDistribution(2, maxQueued);
             threadCount *= 2;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6dd6b48/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
----------------------------------------------------------------------
diff --git a/test/burn/org/apache/cassandra/utils/LongBTreeTest.java b/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
index 9641930..2227dd3 100644
--- a/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
+++ b/test/burn/org/apache/cassandra/utils/LongBTreeTest.java
@@ -52,7 +52,6 @@ import com.codahale.metrics.Snapshot;
 import com.codahale.metrics.Timer;
 import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.apache.cassandra.utils.btree.BTree;
-import org.apache.cassandra.utils.btree.BTreeSearchIterator;
 import org.apache.cassandra.utils.btree.BTreeSet;
 import org.apache.cassandra.utils.btree.UpdateFunction;
 
@@ -122,52 +121,6 @@ public class LongBTreeTest
         testInsertions(10000, 50, 10, 10, false);
     }
 
-    @Test
-    public void testSearchIterator() throws InterruptedException
-    {
-        int threads = Runtime.getRuntime().availableProcessors();
-        final CountDownLatch latch = new CountDownLatch(threads);
-        final AtomicLong errors = new AtomicLong();
-        final AtomicLong count = new AtomicLong();
-        final int perThreadTrees = 100;
-        final int perTreeSelections = 100;
-        final long totalCount = threads * perThreadTrees * perTreeSelections;
-        for (int t = 0 ; t < threads ; t++)
-        {
-            MODIFY.execute(new Runnable()
-            {
-                public void run()
-                {
-                    ThreadLocalRandom random = ThreadLocalRandom.current();
-                    for (int i = 0 ; i < perThreadTrees ; i++)
-                    {
-                        Object[] tree = randomTree(10000, random);
-                        for (int j = 0 ; j < perTreeSelections ; j++)
-                        {
-                            BTreeSearchIterator<Integer, Integer, Integer> searchIterator
= new BTreeSearchIterator<>(tree, ICMP);
-                            for (Integer key : randomSelection(tree, random))
-                                if (key != searchIterator.next(key))
-                                    errors.incrementAndGet();
-                            searchIterator = new BTreeSearchIterator<Integer, Integer,
Integer>(tree, ICMP);
-                            for (Integer key : randomMix(tree, random))
-                                if (key != searchIterator.next(key))
-                                    if (BTree.find(tree, ICMP, key) == key)
-                                        errors.incrementAndGet();
-                            count.incrementAndGet();
-                        }
-                    }
-                    latch.countDown();
-                }
-            });
-        }
-        while (latch.getCount() > 0)
-        {
-            latch.await(10L, TimeUnit.SECONDS);
-            System.out.println(String.format("%.0f%% complete %s", 100 * count.get() / (double)
totalCount, errors.get() > 0 ? ("Errors: " + errors.get()) : ""));
-            assert errors.get() == 0;
-        }
-    }
-
     private static void testInsertions(int totalCount, int perTestCount, int testKeyRatio,
int modificationBatchSize, boolean quickEquality) throws ExecutionException, InterruptedException
     {
         int batchesPerTest = perTestCount / modificationBatchSize;


Mime
View raw message