Merge remote-tracking branch 'origin/jetty-9.4.x'
This commit is contained in:
commit
700d051587
|
@ -30,8 +30,8 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLEngine;
|
||||
|
||||
import org.eclipse.jetty.alpn.ALPN;
|
||||
import org.eclipse.jetty.util.BufferUtil;
|
||||
|
|
|
@ -95,9 +95,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
}, new Stream.Listener.Adapter());
|
||||
|
||||
Assert.assertTrue(latch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
|
||||
sleep(1000);
|
||||
Assert.assertTrue(latch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -137,7 +135,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
}, new Stream.Listener.Adapter());
|
||||
|
||||
Assert.assertTrue(latch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(latch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -191,7 +189,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
});
|
||||
|
||||
Assert.assertTrue(replyLatch.await(3 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(replyLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
|
||||
// Just make sure onClose() has never been called, but don't wait too much
|
||||
Assert.assertFalse(closeLatch.await(idleTimeout / 2, TimeUnit.MILLISECONDS));
|
||||
|
@ -234,7 +232,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
}, new Stream.Listener.Adapter());
|
||||
|
||||
Assert.assertTrue(closeLatch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(closeLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(session.isClosed());
|
||||
}
|
||||
|
||||
|
@ -272,7 +270,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
}, new Stream.Listener.Adapter());
|
||||
|
||||
Assert.assertTrue(closeLatch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(closeLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -325,7 +323,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
});
|
||||
|
||||
Assert.assertFalse(closeLatch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(replyLatch.await(3 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertTrue(replyLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -480,8 +478,8 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
}
|
||||
});
|
||||
|
||||
Assert.assertTrue(dataLatch.await(2 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertFalse(timeoutLatch.await(0, TimeUnit.SECONDS));
|
||||
Assert.assertTrue(dataLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
|
||||
Assert.assertFalse(timeoutLatch.await(1, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -535,7 +533,7 @@ public class IdleTimeoutTest extends AbstractTest
|
|||
stream.data(new DataFrame(stream.getId(), ByteBuffer.allocate(1), true), Callback.NOOP);
|
||||
});
|
||||
|
||||
Assert.assertFalse(resetLatch.await(0, TimeUnit.SECONDS));
|
||||
Assert.assertFalse(resetLatch.await(1, TimeUnit.SECONDS));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -117,6 +117,9 @@ public class StringUtil
|
|||
*/
|
||||
public static String asciiToLowerCase(String s)
|
||||
{
|
||||
if (s == null)
|
||||
return null;
|
||||
|
||||
char[] c = null;
|
||||
int i=s.length();
|
||||
|
||||
|
|
Loading…
Reference in New Issue