public void testChukwaAppender() {
try {
ChukwaAgent agent = new ChukwaAgent();
ChunkCatcherConnector chunks = new ChunkCatcherConnector();
chunks.start();
Logger myLogger = Logger.getLogger(TestChukwaAppender.class);
File out = new File("/tmp/chukwa_test_out");
out.delete();
ChukwaDailyRollingFileAppender app = new ChukwaDailyRollingFileAppender(
new SimpleLayout(), out.getAbsolutePath(), "yyyy-MM-dd");
app.append(new LoggingEvent("foo", myLogger, System.currentTimeMillis(),Priority.INFO, "foo", null));
assertEquals(1, agent.adaptorCount());
Chunk c = chunks.waitForAChunk();
System.out.println("read a chunk OK");
String logLine = new String(c.getData());
assertTrue(logLine.equals("INFO - foo\n"));
System.out.println(new String(c.getData()));
//