From 27cd2bfda07ac9dc2b336a45aadfb96a168a2d2b Mon Sep 17 00:00:00 2001 From: T Jake Luciani Date: Thu, 26 Jul 2012 14:35:31 -0400 Subject: [PATCH] remove poorly mocked test in favor of new test --- .../thrift/ThriftValidationTest.java | 45 +------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java index e550144b2a..bcbbbf4037 100644 --- a/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java +++ b/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java @@ -52,50 +52,7 @@ public class ThriftValidationTest extends CleanupHelper @Test public void testColumnValueSizeForIndexedColumn() throws ConfigurationException, InvalidRequestException { - CfDef cfDef = Schema.instance.getCFMetaData("Keyspace1", "Standard1").toThrift(); - ByteBuffer columnName = AsciiType.instance.fromString("indexed"); - - // add an indexed column definition - cfDef.addToColumn_metadata(new ColumnDef(columnName, UTF8Type.class.getCanonicalName()) - .setIndex_type(IndexType.KEYS) - .setIndex_name("indexed_col")); - - CFMetaData metaData = CFMetaData.fromThrift(cfDef); - - Column column = new Column(columnName) - .setValue(new byte[FBUtilities.MAX_UNSIGNED_SHORT + 1]) - .setTimestamp(System.currentTimeMillis()); - - boolean gotException = false; - - try - { - // this run should throw an exception - ThriftValidation.validateColumnData(metaData, column, false); - } - catch (InvalidRequestException e) - { - gotException = true; - } - - assert gotException : "expected InvalidRequestException but not received."; - - // change value to be less than unsigned short size - column.setValue(new byte[12]); - - gotException = false; // reset flag - - try - { - // this run should run clean - ThriftValidation.validateColumnData(metaData, column, false); - } - catch (InvalidRequestException e) - { - gotException = true; - } - - assert !gotException : "got unexpected InvalidRequestException"; + //Replaced by SecondaryIndexColumnSizeTest } @Test