Updated Branches: refs/heads/trunk 08cd021ea -> e249f4e52
test for UDP server : @ignored due to idle detection bug Project: http://git-wip-us.apache.org/repos/asf/mina/repo Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/e249f4e5 Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/e249f4e5 Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/e249f4e5 Branch: refs/heads/trunk Commit: e249f4e52865da771488f77e8c73fcf41bb800f4 Parents: 08cd021 Author: jvermillard <[email protected]> Authored: Thu May 23 11:03:35 2013 +0200 Committer: jvermillard <[email protected]> Committed: Thu May 23 11:03:35 2013 +0200 ---------------------------------------------------------------------- .../transport/udp/NioUdpClientFilterEventTest.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina/blob/e249f4e5/core/src/test/java/org/apache/mina/transport/udp/NioUdpClientFilterEventTest.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/mina/transport/udp/NioUdpClientFilterEventTest.java b/core/src/test/java/org/apache/mina/transport/udp/NioUdpClientFilterEventTest.java index 14fec93..5310061 100644 --- a/core/src/test/java/org/apache/mina/transport/udp/NioUdpClientFilterEventTest.java +++ b/core/src/test/java/org/apache/mina/transport/udp/NioUdpClientFilterEventTest.java @@ -64,6 +64,8 @@ public class NioUdpClientFilterEventTest { private final CountDownLatch openLatch = new CountDownLatch(CLIENT_COUNT); + private final CountDownLatch idleLatch = new CountDownLatch(CLIENT_COUNT); + private final CountDownLatch closedLatch = new CountDownLatch(CLIENT_COUNT); /** @@ -123,6 +125,9 @@ public class NioUdpClientFilterEventTest { // test is message was received by the client assertTrue(msgReadLatch.await(WAIT_TIME, TimeUnit.MILLISECONDS)); + // the session idled + assertEquals(CLIENT_COUNT, idleLatch.getCount()); + // close the session assertEquals(CLIENT_COUNT, closedLatch.getCount()); serverSocket.close(); @@ -189,6 +194,7 @@ public class NioUdpClientFilterEventTest { @Override public void sessionIdle(IoSession session, IdleStatus status) { LOG.info("** session idle {}", session); + idleLatch.countDown(); session.close(true); } }
