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

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant-ivy.git


The following commit(s) were added to refs/heads/master by this push:
     new df643934 skip tests if test server is not reachable
df643934 is described below

commit df64393433edab2ff6fb27435214ec7acad2a676
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sat Jun 6 16:54:04 2026 +0200

    skip tests if test server is not reachable
---
 test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java   | 2 ++
 test/java/org/apache/ivy/util/url/HttpClientHandlerTest.java | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java 
b/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java
index 132cf404..68a0f29a 100644
--- a/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java
+++ b/test/java/org/apache/ivy/util/url/BasicURLHandlerTest.java
@@ -28,6 +28,7 @@ import org.junit.Test;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 /**
  * Test BasicURLHandler
@@ -67,6 +68,7 @@ public class BasicURLHandlerTest {
 
     @Test
     public void testContentEncoding() throws Exception {
+        assumeTrue(handler.isReachable(new URL("http://carsten.codimi.de/";), 
5000));
         assertDownloadOK(new 
URL("http://carsten.codimi.de/gzip.yaws/daniels.html";), new File(
                 testDir, "gzip.txt"));
         assertDownloadOK(new URL(
diff --git a/test/java/org/apache/ivy/util/url/HttpClientHandlerTest.java 
b/test/java/org/apache/ivy/util/url/HttpClientHandlerTest.java
index 06dd7f04..eed0882f 100644
--- a/test/java/org/apache/ivy/util/url/HttpClientHandlerTest.java
+++ b/test/java/org/apache/ivy/util/url/HttpClientHandlerTest.java
@@ -42,6 +42,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThrows;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 public class HttpClientHandlerTest {
 
@@ -98,6 +99,7 @@ public class HttpClientHandlerTest {
 
     @Test
     public void testContentEncoding() throws Exception {
+        assumeTrue(handler.isReachable(new URL("http://carsten.codimi.de/";), 
5000));
         assertDownloadOK(new 
URL("http://carsten.codimi.de/gzip.yaws/daniels.html";), new File(
                 testDir, "gzip.txt"));
         assertDownloadOK(new URL(

Reply via email to