// we test only non-recoverable channels now
return;
}
// add an ACKING receiver to the channel
SimpleReceiver r = new SimpleReceiver("AckingReceiver", SimpleReceiver.ACKING);
assertTrue(queue.add(r));
MessageReference ref = createReference(0, false, "payload");
SimpleDeliveryObserver observer = new SimpleDeliveryObserver();
Transaction tx = tr.createTransaction();
// transacted send, non-reliable message, one message
// for a transactional send, handle() return value is unspecified
queue.handle(observer, ref, tx);
// no messages in the channel
assertEquals(0, queue.browse().size());
// no message at the receiver
assertTrue(r.getMessages().isEmpty());
tx.commit();
assertTrue(queue.browse().isEmpty());
List received = r.getMessages();
assertEquals(1, received.size());
Message sm = (Message)received.iterator().next();
assertFalse(sm.isReliable());
assertEquals(0, sm.getMessageID());
}