From af529be069b651808310c3c37e2167d216979f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= Date: Wed, 3 Aug 2022 14:51:28 +0000 Subject: [PATCH] 8285836: sun/net/www/http/KeepAliveCache/KeepAliveProperty.java failed with "RuntimeException: Failed in server" Reviewed-by: dfuchs, jpai --- .../jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java b/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java index b0d6b0d1c1a..83491ad4e38 100644 --- a/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java +++ b/test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java @@ -40,6 +40,7 @@ import static java.net.Proxy.NO_PROXY; public class KeepAliveProperty { static volatile boolean pass = false; + static Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); static class Server extends Thread { final ServerSocket server; @@ -138,7 +139,6 @@ public class KeepAliveProperty { public static void main(String args[]) throws Exception { // exercise the logging code - Logger logger = Logger.getLogger("sun.net.www.protocol.http.HttpURLConnection"); logger.setLevel(Level.FINEST); ConsoleHandler h = new ConsoleHandler(); h.setLevel(Level.FINEST); @@ -171,6 +171,7 @@ public class KeepAliveProperty { if (!expectClose) throw e; } + s.join(); if (!pass) throw new RuntimeException("Failed in server");