{
// we test only recoverable channels now
return;
}
BrokenReceiver brokenReceiver = new BrokenReceiver(2);
assertTrue(queue.add(brokenReceiver));
MessageReference ref = createReference(0, false, "payload");
SimpleDeliveryObserver observer = new SimpleDeliveryObserver();
Transaction tx = tr.createTransaction();
log.debug("sending message 1");
// transacted send, non-reliable message, one message
// for a transactional send, handle() return value is unspecified
queue.handle(observer, ref, tx);
ref = createReference(1, false, "payload");
log.debug("sending message 2");
queue.handle(observer, ref, tx);
ref = createReference(2, false, "payload");
log.debug("sending message 3");
queue.handle(observer, ref, tx);
// no messages in the channel
assertEquals(0, queue.browse().size());
tx.commit();
assertEquals(2, queue.browse().size());
assertEquals(1, brokenReceiver.getMessages().size());
}