You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/06/06 15:10:08 UTC

[sling-whiteboard] 10/16: Use Maven central for connect timeout tests. Accessing sling.apache.org failed with a 'connection refused' error on Jenkins, presumably since builds.apache.org has direct access to other apache.org servers.

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git

commit 89d2e52a60ba4a65be05b3d366ce3cfcf9203b04
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jun 5 15:10:45 2019 +0200

    Use Maven central for connect timeout tests. Accessing sling.apache.org failed with a 'connection refused' error on Jenkins, presumably since builds.apache.org has direct access to other apache.org servers.
---
 .../src/test/java/org/apache/sling/uca/impl/IntegrationTest.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java b/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java
index 0a3af13..9e42394 100644
--- a/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java
+++ b/url-connection-agent/src/test/java/org/apache/sling/uca/impl/IntegrationTest.java
@@ -48,7 +48,7 @@ public class IntegrationTest {
      * <p>It is surprisingly hard to simulate a connnection timeout. The most reliable way seems to
      * be to get a firewall to drop packets, but this is very hard to do portably and safely
      * in a unit test. The least bad possible solution is to access an URL that we know will timeout
-     * and that is related to us - the Sling website.</p>
+     * and that is able to sustain additional traffic. Maven Central is a good candidate for that.</p>
      * 
      * @throws IOException various I/O problems 
      */
@@ -56,7 +56,7 @@ public class IntegrationTest {
     public void connectTimeout() throws IOException {
 
         SocketTimeoutException exception = assertThrows(SocketTimeoutException.class, 
-            () -> assertTimeout(ofSeconds(5),  () -> runTest("http://sling.apache.org:81"))
+            () -> assertTimeout(ofSeconds(5),  () -> runTest("http://repo1.maven.org:81"))
         );
         assertEquals("connect timed out", exception.getMessage());
     }