Skip to content

Commit

Permalink
8285836: sun/net/www/http/KeepAliveCache/KeepAliveProperty.java faile…
Browse files Browse the repository at this point in the history
…d with "RuntimeException: Failed in server"

Backport-of: af529be069b651808310c3c37e2167d216979f69
  • Loading branch information
GoeLin committed Sep 29, 2022
1 parent 1b98800 commit 461c6e8
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -40,6 +40,7 @@
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;
Expand Down Expand Up @@ -138,7 +139,6 @@ static String fetch(URL url) throws Exception {

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);
Expand Down Expand Up @@ -171,6 +171,7 @@ public static void main(String args[]) throws Exception {
if (!expectClose)
throw e;
}
s.join();

if (!pass)
throw new RuntimeException("Failed in server");
Expand Down

0 comments on commit 461c6e8

Please sign in to comment.