Checking a session is created? (see AbstractTrafficControlTest.testSuspendResumeReadWrite)

2008-10-28 Thread Barrie Treloar
I'm a bit worried about the comments in this method for AbstractTrafficControlTest: public void testSuspendResumeReadWrite() throws Exception { ConnectFuture future = connect(port, new ClientIoHandler()); future.awaitUninterruptibly(); IoSession session =

Re: Checking a session is created? (see AbstractTrafficControlTest.testSuspendResumeReadWrite)

2008-10-28 Thread Emmanuel Lecharny
Barrie Treloar wrote: I'm a bit worried about the comments in this method for AbstractTrafficControlTest: public void testSuspendResumeReadWrite() throws Exception { ConnectFuture future = connect(port, new ClientIoHandler()); future.awaitUninterruptibly(); IoSession

Re: Checking a session is created? (see AbstractTrafficControlTest.testSuspendResumeReadWrite)

2008-10-28 Thread Barrie Treloar
It's a bit tricky : the session can be connected, but the sessionCreated event might not be called yet. As we need to get the 'lock' object which is injected into the session to run the test, we have to wait for the sessionCreated to be executed (because this is the place where this lock is

Re: Checking a session is created? (see AbstractTrafficControlTest.testSuspendResumeReadWrite)

2008-10-28 Thread Emmanuel Lecharny
Barrie Treloar wrote: tcp/ip has an easy enough state diagram to google for. udp being connectionless doesn't seem to have such a diagram. I don't think it ha anything to do with the underlying newtork state. The session states I'm talking about is the application session : if you don't