fail("SQL Exception: "+ExceptionUtil.getStackTrace(ex));
}
}
public void testAggregator() {
Aggregator dba = new Aggregator();
DatabaseWriter db = new DatabaseWriter(dbSetup.cluster);
dba.setWriter(db);
String queries = Aggregator.getContents(new File(System
.getenv("CHUKWA_CONF_DIR")
+ File.separator + "aggregator.sql"));
String[] query = queries.split("\n");
for (int i = 0; i < query.length; i++) {
if(query[i].indexOf("#")==-1) {
try {
dba.process(query[i]);
assertTrue("Completed query: "+query[i],true);
} catch(Throwable ex) {
fail("Exception: "+ExceptionUtil.getStackTrace(ex));
}
}