public void testLogRotate() throws IOException, InterruptedException,
ChukwaAgent.AlreadyRunningException {
ChukwaAgent agent = new ChukwaAgent();
// Remove any adaptor left over from previous run
ChukwaConfiguration cc = new ChukwaConfiguration();
int portno = cc.getInt("chukwaAgent.control.port", 9093);
ChukwaAgentController cli = new ChukwaAgentController("localhost", portno);
cli.removeAll();
// sleep for some time to make sure we don't get chunk from existing streams
Thread.sleep(5000);
File testFile = makeTestFile("chukwaLogRotateTest", 80);