From 929defa465d82b66a6951f8b7f155c4fbbbffe6b Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Mon, 30 Jul 2012 16:01:58 +0200 Subject: [PATCH] Jetty9 - Removed assert with side effect. --- .../jetty/io/SelectChannelEndPointTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/jetty-io/src/test/java/org/eclipse/jetty/io/SelectChannelEndPointTest.java b/jetty-io/src/test/java/org/eclipse/jetty/io/SelectChannelEndPointTest.java index da9f3e51354..35498e73e01 100644 --- a/jetty-io/src/test/java/org/eclipse/jetty/io/SelectChannelEndPointTest.java +++ b/jetty-io/src/test/java/org/eclipse/jetty/io/SelectChannelEndPointTest.java @@ -592,10 +592,8 @@ public class SelectChannelEndPointTest for (int i = 0; i < _writeCount; i++) { if (i % 1000 == 0) - { - //System.out.println(i); TimeUnit.MILLISECONDS.sleep(200); - } + // Verify echo server to client for (int j = 0; j < data.length(); j++) { @@ -604,18 +602,20 @@ public class SelectChannelEndPointTest assertTrue(b > 0); assertEquals("test-" + i + "/" + j, c, (char)b); } + if (i == 0) _lastEndp.setIdleTimeout(60000); } - client.close(); - int i = 0; - while (server.isOpen()) + for (int i = 0; i < 10; ++i) { - assert (i++ < 10); - Thread.sleep(10); + if (server.isOpen()) + Thread.sleep(10); + else + break; } + Assert.assertFalse(server.isOpen()); } }