Try this:
http://www.darose.net/TestDummyIoSession.java
Thanks,
DR
Hmmm .... dunno. Just wasted a lot of time trying to debug through
this, and I really have no idea. I wound up just having the unit test
manually issue a session.getCloseFuture().setClosed(); in order to
trigger the close listener notification.
I think that the listeners are never called in the
awaitUninterruptibly() method :
/**
* {...@inheritdoc}
*/
public IoFuture awaitUninterruptibly() {
try {
await0(Long.MAX_VALUE, false);
} catch ( InterruptedException ie) {
// Do nothing : this catch is just mandatory by contract
}
...
The doc is explicit here :
/**
* Wait for the asynchronous operation to complete uninterruptibly.
* *The attached listeners will be notified when the operation is
* completed.*
*
* @return the current IoFuture
*/
IoFuture awaitUninterruptibly();
The listeners are never called...
I have changed the code to be something like :
public IoFuture awaitUninterruptibly() {
try {
await0(Long.MAX_VALUE, false);
notifyListeners();
} catch ( InterruptedException ie) {
...
and the listener is called. I will check in this change, but it would be
cool if you can create a JIRA so that I can attach the patch to this JIRA.
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org