From 43dbf5899b455acf7c665d221564c4d4dff7dea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Jeli=C5=84ski?= Date: Wed, 5 Oct 2022 06:47:19 +0000 Subject: [PATCH] 8186765: Speed up test sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java Reviewed-by: dfuchs, jpai --- .../protocol/https/HttpsClient/ProxyAuthTest.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java b/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java index e78b056c8ca..7dfae0f74cb 100644 --- a/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java +++ b/test/jdk/sun/net/www/protocol/https/HttpsClient/ProxyAuthTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -100,6 +100,17 @@ public class ProxyAuthTest extends SSLSocketTemplate { return true; } + @Override + protected void doServerSide() throws Exception { + if (expectSuccess) { + super.doServerSide(); + } else { + // we don't expect anything to connect to the server + serverPort = 443; + serverCondition.countDown(); + } + } + @Override protected void runServerApplication(SSLSocket socket) throws Exception { String response = "Proxy authentication for tunneling succeeded ..";