public void testWaitForConfirms()
throws IOException, InterruptedException
{
final SortedSet<Long> unconfirmedSet =
Collections.synchronizedSortedSet(new TreeSet<Long>());
channel.addConfirmListener(new ConfirmListener() {
public void handleAck(long seqNo, boolean multiple) {
if (!unconfirmedSet.contains(seqNo)) {
fail("got duplicate ack: " + seqNo);
}
if (multiple) {