Description
I'm trying to add a close listener onto a session, and perform some processing after the session close is completed.
This works fine on a live system (i.e., when using a NioSocketSession), but when I unit test using a DummySession I never get notified about operationComplete.
See example JUnit test case at:
http://www.darose.net/TestDummyIoSession.java
Additional analysis, as per Emmanuel Lécharny :
I think that the listeners are never called in the awaitUninterruptibly() method :
/**
- {@inheritDoc}
*/
{ await0(Long.MAX_VALUE, false); }
public IoFuture awaitUninterruptibly() {
trycatch ( 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...