public void testFailedCollector() {
try {
ChukwaAgent agent = new ChukwaAgent();
boolean failed = false;
HttpConnector connector = new HttpConnector(agent,
"http://localhost:1234/chukwa");
connector.start();
ChukwaConfiguration cc = new ChukwaConfiguration();
int portno = cc.getInt("chukwaAgent.control.port", 9093);
ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
File tmpOutput = TempFileUtil.makeBinary(2000);
cli.addFile("unknown", tmpOutput.getAbsolutePath());
System.out.println("have " + agent.adaptorCount() + " running adaptors");
cli.removeFile("unknown", tmpOutput.getAbsolutePath());
tmpOutput.delete();
assertFalse(failed);
System.out.println("done");
agent.shutdown();
connector.shutdown();
} catch (Exception e) {
e.printStackTrace();
}
}