remove poorly mocked test in favor of new test

This commit is contained in:
T Jake Luciani 2012-07-26 14:35:31 -04:00
parent bce2d6c357
commit 27cd2bfda0
1 changed files with 1 additions and 44 deletions

View File

@ -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