t.interrupt();
} catch (InterruptedException e) {
}
tes.close();
assertEquals(25, cnt.getCount());
ReportEvent rpt = tes.getMetrics();
/*
* The check on BytesIn is different than one on TestThriftSinks tests. This
* is because currently in the AvroSink version, BytesIn is equal to the
* number of Bytes of the Event.body shipped.
*/
assertEquals(2500, rpt.getLongMetric(AvroEventSource.A_BYTES_IN)
.longValue());
assertEquals(25, rpt.getLongMetric(AvroEventSource.A_DEQUEUED).longValue());
assertEquals(25, rpt.getLongMetric(AvroEventSource.A_ENQUEUED).longValue());
assertEquals(0, rpt.getLongMetric(AvroEventSource.A_QUEUE_CAPACITY)
.intValue());
assertEquals(1000, rpt.getLongMetric(AvroEventSource.A_QUEUE_FREE)
.intValue());
}