From cfc63a9d9800fb7d1145e669b62eff2efe37e7b6 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Thu, 5 Dec 2019 17:53:46 +1100 Subject: [PATCH] Issue #4331 Close Complete invert test as we can now call complete when not ready! Signed-off-by: Greg Wilkins --- .../org/eclipse/jetty/http2/client/AsyncIOTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AsyncIOTest.java b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AsyncIOTest.java index 1881a10a6d3e..c6d5bfcd9ba5 100644 --- a/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AsyncIOTest.java +++ b/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/AsyncIOTest.java @@ -243,8 +243,8 @@ public void onWritePossible() throws IOException // The write is too large and will stall. output.write(ByteBuffer.wrap(new byte[2 * clientWindow])); - // We cannot call complete() now before checking for isReady(). - // This will abort the response and the client will receive a reset. + // We can now call complete() now before checking for isReady(). + // This will asynchronously complete when the write is finished. asyncContext.complete(); } @@ -275,10 +275,15 @@ public Map onPreface(Session session) session.newStream(frame, promise, new Stream.Listener.Adapter() { @Override - public void onReset(Stream stream, ResetFrame frame) + public void onClosed(Stream stream) { latch.countDown(); } + + @Override + public void onReset(Stream stream, ResetFrame frame) + { + } }); assertTrue(latch.await(5, TimeUnit.SECONDS)); }