if(!AllTests.isSetup()) {
return;
}
VerticaInputSplit input = getVerticaSplit(false);
VerticaRecordReader reader = new VerticaRecordReader(input, input
.getConfiguration());
TaskAttemptContext context = new TaskAttemptContextImpl(input
.getConfiguration(), new TaskAttemptID());
reader.initialize(input, context);
boolean hasValue = reader.nextKeyValue();
assertEquals("There should be a record in the database", hasValue, true);
LongWritable key = reader.getCurrentKey();
VerticaRecord value = reader.getCurrentValue();
assertEquals("Key should be 1 for first record", key.get(), 1);
assertEquals("Result type should be VARCHAR", ((Integer)value.getTypes().get(0)).intValue(), Types.VARCHAR);
assertEquals("Result value should be three", value.getValues().get(0), "three");
reader.close();
}