private void simpleScan(String procName, int expected, boolean useLimit) throws Exception {
assert(expected <= NUM_TUPLES);
this.loadData();
// We should have all of our tuples evicted
VoltTable evictResult = this.evictData();
long evicted = evictResult.getLong("ANTICACHE_TUPLES_EVICTED");
assertTrue("No tuples were evicted!\n"+evictResult, evicted > 0);
// System.err.println(VoltTableUtil.format(evictResult));
// Now execute a query that needs to access data from this block
Procedure proc = this.getProcedure(procName); // Special Single-Stmt Proc
ClientResponse cresponse = null;
if (useLimit) {
cresponse = this.client.callProcedure(proc.getName(), expected);
} else {
cresponse = this.client.callProcedure(proc.getName());
}
assertEquals(Status.OK, cresponse.getStatus());
// Make sure that we tracked that we tried to touch evicted data
assertEquals(1, this.profiler.evictedaccess_history.size());
// And then check to make sure that we get the correct number of rows back
VoltTable results[] = cresponse.getResults();
System.err.println(VoltTableUtil.format(results[0]));
assertEquals(1, results.length);
assertEquals(expected, results[0].getRowCount());
}