cleanup

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

Branch: refs/heads/cassandra-1.1
Commit: bcc7f7b0fbd0eabfc1ae985009cce7fca985b613
Parents: 27cd2bf
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Thu Jul 26 17:12:02 2012 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Thu Jul 26 17:12:02 2012 -0500

----------------------------------------------------------------------
 .../cassandra/db/SecondaryIndexColumSizeTest.java  |   29 +++++++--------
 .../cassandra/thrift/ThriftValidationTest.java     |    9 -----
 2 files changed, 14 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bcc7f7b0/test/unit/org/apache/cassandra/db/SecondaryIndexColumSizeTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/SecondaryIndexColumSizeTest.java 
b/test/unit/org/apache/cassandra/db/SecondaryIndexColumSizeTest.java
index bf35c30..1f6a0a1 100644
--- a/test/unit/org/apache/cassandra/db/SecondaryIndexColumSizeTest.java
+++ b/test/unit/org/apache/cassandra/db/SecondaryIndexColumSizeTest.java
@@ -17,8 +17,6 @@
 * under the License.
 */
 package org.apache.cassandra.db;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -26,17 +24,20 @@ import java.util.List;
 import java.util.Set;
 import java.util.SortedSet;
 
+import org.junit.Test;
+
 import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.index.PerColumnSecondaryIndex;
 import org.apache.cassandra.db.index.PerRowSecondaryIndex;
 import org.apache.cassandra.db.index.SecondaryIndexSearcher;
 import org.apache.cassandra.thrift.Column;
 import org.apache.cassandra.utils.ByteBufferUtil;
-import org.junit.Test;
 
-public class SecondaryIndexColumSizeTest 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class SecondaryIndexColumSizeTest
 {
-    
     @Test
     public void test64kColumn()
     {
@@ -55,11 +56,11 @@ public class SecondaryIndexColumSizeTest
         buffer.flip(); 
         column.value = buffer;
 
-        SolrIndex solrIndex = new SolrIndex();
-        ColumnIndex perColumnIndex = new ColumnIndex();
+        MockRowIndex mockRowIndex = new MockRowIndex();
+        MockColumnIndex mockColumnIndex = new MockColumnIndex();
         
-        assertTrue(solrIndex.validate(column));
-        assertFalse(perColumnIndex.validate(column));
+        assertTrue(mockRowIndex.validate(column));
+        assertFalse(mockColumnIndex.validate(column));
         
         // test less than 64k value
         buffer.flip();
@@ -67,13 +68,12 @@ public class SecondaryIndexColumSizeTest
         buffer.putInt(20);
         buffer.flip();
         
-        assertTrue(solrIndex.validate(column));
-        assertTrue(perColumnIndex.validate(column));        
+        assertTrue(mockRowIndex.validate(column));
+        assertTrue(mockColumnIndex.validate(column));
     }
 
-    public class SolrIndex extends PerRowSecondaryIndex
+    private class MockRowIndex extends PerRowSecondaryIndex
     {
-
         @Override
         public void applyIndexUpdates(ByteBuffer rowKey, ColumnFamily cf, 
SortedSet<ByteBuffer> mutatedIndexedColumns, ColumnFamily oldIndexedColumns) 
throws IOException 
         {
@@ -141,9 +141,8 @@ public class SecondaryIndexColumSizeTest
     }
     
     
-    public class ColumnIndex extends PerColumnSecondaryIndex
+    private class MockColumnIndex extends PerColumnSecondaryIndex
     {
-
         @Override
         public void init() 
         {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bcc7f7b0/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java 
b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
index bcbbbf4..c025037 100644
--- a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
+++ b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
@@ -21,8 +21,6 @@ package org.apache.cassandra.thrift;
  */
 
 
-import java.nio.ByteBuffer;
-
 import org.junit.Test;
 
 import org.apache.cassandra.CleanupHelper;
@@ -33,7 +31,6 @@ import org.apache.cassandra.db.marshal.AsciiType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.locator.LocalStrategy;
 import org.apache.cassandra.locator.NetworkTopologyStrategy;
-import org.apache.cassandra.utils.FBUtilities;
 
 public class ThriftValidationTest extends CleanupHelper
 {
@@ -50,12 +47,6 @@ public class ThriftValidationTest extends CleanupHelper
     }
 
     @Test
-    public void testColumnValueSizeForIndexedColumn() throws 
ConfigurationException, InvalidRequestException
-    {
-       //Replaced by SecondaryIndexColumnSizeTest
-    }
-
-    @Test
     public void testColumnNameEqualToKeyAlias()
     {
         CFMetaData metaData = Schema.instance.getCFMetaData("Keyspace1", 
"Standard1");

Reply via email to