コード例 #1
0
 private static void assertQueueEmpty(PendingWriteQueue queue) {
   Assert.assertTrue(queue.isEmpty());
   Assert.assertEquals(0, queue.size());
   Assert.assertNull(queue.current());
   Assert.assertNull(queue.removeAndWrite());
   Assert.assertNull(queue.removeAndWriteAll());
 }
コード例 #2
0
 @Override
 public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
     throws Exception {
   queue.add(msg, promise);
   Assert.assertFalse(queue.isEmpty());
   Assert.assertEquals(++expectedSize, queue.size());
   Assert.assertNotNull(queue.current());
 }