// a little delay get data to the receiving side.
Thread.sleep(1000);
tes.close();
assertEquals(25 * threads, cnt.getCount());
ReportEvent rpt = tes.getMetrics();
assertEquals(4475 * threads, sendByteSum.get());
assertEquals(4475 * threads, rpt
.getLongMetric(ThriftEventSource.A_BYTES_IN).longValue());
assertEquals(25 * threads, rpt.getLongMetric(ThriftEventSource.A_DEQUEUED)
.longValue());
assertEquals(25 * threads, rpt.getLongMetric(ThriftEventSource.A_ENQUEUED)
.longValue());
assertEquals(0, rpt.getLongMetric(ThriftEventSource.A_QUEUE_CAPACITY)
.longValue());
assertEquals(1000, rpt.getLongMetric(ThriftEventSource.A_QUEUE_FREE)
.longValue());
}