Skip to content

Commit 9f8cc61

Browse files
committed
Issue #12272 - Potential deadlock with Vaadin.
Updated test case to use Input/OutputStream as well as Reader/Writer. Signed-off-by: Simone Bordet <[email protected]>
1 parent 473445b commit 9f8cc61

File tree

1 file changed

+7
-4
lines changed
  • jetty-ee10/jetty-ee10-tests/jetty-ee10-test-client-transports/src/test/java/org/eclipse/jetty/ee10/test/client/transport

1 file changed

+7
-4
lines changed

jetty-ee10/jetty-ee10-tests/jetty-ee10-test-client-transports/src/test/java/org/eclipse/jetty/ee10/test/client/transport/Http2AsyncIOServletTest.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import org.eclipse.jetty.util.FuturePromise;
5050
import org.eclipse.jetty.util.component.LifeCycle;
5151
import org.junit.jupiter.api.AfterEach;
52-
import org.junit.jupiter.api.Test;
5352
import org.junit.jupiter.params.ParameterizedTest;
5453
import org.junit.jupiter.params.provider.ValueSource;
5554

@@ -223,8 +222,9 @@ public void onStartAsync(AsyncEvent event)
223222
assertTrue(errorLatch.await(5, TimeUnit.SECONDS));
224223
}
225224

226-
@Test
227-
public void testSessionShutdownWithPendingRequest() throws Exception
225+
@ParameterizedTest
226+
@ValueSource(booleans = {false, true})
227+
public void testSessionShutdownWithPendingRequest(boolean useReaderWriter) throws Exception
228228
{
229229
CountDownLatch serverFailureLatch = new CountDownLatch(1);
230230
start(new HttpServlet()
@@ -234,7 +234,10 @@ protected void service(HttpServletRequest request, HttpServletResponse response)
234234
{
235235
try
236236
{
237-
request.getInputStream().transferTo(response.getOutputStream());
237+
if (useReaderWriter)
238+
request.getReader().transferTo(response.getWriter());
239+
else
240+
request.getInputStream().transferTo(response.getOutputStream());
238241
}
239242
catch (Throwable x)
240243
{

0 commit comments

Comments
 (0)