5152535455565758596061
add(e6); add(e1); } }; Assert.assertEquals(q.take(), e5); // WARN Assert.assertEquals(q.take(), e1); // INFO Assert.assertEquals(q.take(), e6); // DEBUG }
5253545556575859606162
add(e1); } }; Assert.assertEquals(q.take(), e5); // WARN Assert.assertEquals(q.take(), e1); // INFO Assert.assertEquals(q.take(), e6); // DEBUG } @SuppressWarnings("serial")
5354555657585960616263
} }; Assert.assertEquals(q.take(), e5); // WARN Assert.assertEquals(q.take(), e1); // INFO Assert.assertEquals(q.take(), e6); // DEBUG } @SuppressWarnings("serial") @Test
8081828384858687888990
} }; Event[] ordered = { e1, e2, e3, e4 }; for (int i = 0; i < ordered.length; i++) { Event qe = q.take(); System.out.println("take " + qe.getTimestamp() + " " + qe.getNanos() + " " + qe); Assert.assertEquals(ordered[i], qe); }
116117118119120121122123124125126
} }; Event[] ordered = { e1, e2, e3, e4, e }; for (int i = 0; i < ordered.length; i++) { Event qe = q.take(); System.out.println("take " + qe.getTimestamp() + " " + qe.getNanos() + " " + qe); Assert.assertEquals(ordered[i], qe); }