You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ck...@apache.org on 2018/04/07 21:38:46 UTC

[2/2] logging-log4j2 git commit: Fix SslConfigurationTest running on Windows behind proxy

Fix SslConfigurationTest running on Windows behind proxy

Corporate proxies might not allow connection to external resources.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3063677a
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3063677a
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3063677a

Branch: refs/heads/master
Commit: 3063677a89ad8b6a6113c8ab878477e1dd6e34b0
Parents: 324d354
Author: Kostiantyn Shchepanovskyi <ko...@playtech.com>
Authored: Tue Feb 6 12:20:35 2018 +0200
Committer: Carter Kozak <ck...@apache.org>
Committed: Sat Apr 7 17:38:31 2018 -0400

----------------------------------------------------------------------
 .../apache/logging/log4j/core/net/ssl/SslConfigurationTest.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3063677a/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SslConfigurationTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SslConfigurationTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SslConfigurationTest.java
index 41349a0..8ddb3e8 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SslConfigurationTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SslConfigurationTest.java
@@ -18,6 +18,7 @@ package org.apache.logging.log4j.core.net.ssl;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.net.ConnectException;
 import java.net.UnknownHostException;
 
 import javax.net.ssl.SSLSocket;
@@ -104,6 +105,8 @@ public class SslConfigurationTest {
             }
         } catch (final UnknownHostException offline) {
             // this exception is thrown on Windows when offline
+        } catch (final ConnectException connectionTimeout) {
+            // this exception is thrown on Windows when host is behind a proxy that does not allow connection to external network
         }
     }
 
@@ -124,6 +127,8 @@ public class SslConfigurationTest {
             }
         } catch (final UnknownHostException offline) {
             // this exception is thrown on Windows when offline
+        } catch (final ConnectException connectionTimeout) {
+            // this exception is thrown on Windows when host is behind a proxy that does not allow connection to external network
         }
     }