This is an automated email from the ASF dual-hosted git repository.
jkf pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 9b4393b Avoid connection refused errors by leaving some time between
the gets, works locally lets see if it also works for jenkins
9b4393b is described below
commit 9b4393b85ca7acebd7b228ea5ee79e4aa7e810a8
Author: jkf <j...@famkruithof.net>
AuthorDate: Sun May 26 08:46:09 2019 +0200
Avoid connection refused errors by leaving some time between the gets,
works locally lets see if it also works for jenkins
---
src/tests/antunit/taskdefs/get-test.xml | 12 +++++++++++-
src/tests/antunit/taskdefs/gunzip-test.xml | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/tests/antunit/taskdefs/get-test.xml
b/src/tests/antunit/taskdefs/get-test.xml
index b6b5e11..2133321 100644
--- a/src/tests/antunit/taskdefs/get-test.xml
+++ b/src/tests/antunit/taskdefs/get-test.xml
@@ -20,12 +20,14 @@
<import file="../antunit-base.xml" />
<property name="location" value="https://ant.apache.org/webtest/gettest" />
+ <property name="unsecurelocation"
value="http://ant.apache.org/webtest/gettest/http-to-https.txt" />
<target name="setUp">
<mkdir dir="${output}" />
</target>
<target name="testSeeOtherRedirect">
+ <sleep milliseconds="250"/>
<get src="${location}/other.txt" dest="${output}/other.tmp"/>
<au:assertTrue>
<resourcecount count="1">
@@ -39,6 +41,7 @@
</target>
<target name="testPermanentRedirect">
+ <sleep milliseconds="250"/>
<get src="${location}/permanent.txt" dest="${output}/permanent.tmp"/>
<au:assertTrue>
<resourcecount count="1">
@@ -52,6 +55,7 @@
</target>
<target name="testTemporaryRedirect">
+ <sleep milliseconds="250"/>
<get src="${location}/temp.txt" dest="${output}/temp.txt"/>
<au:assertTrue>
<resourcecount count="1">
@@ -65,6 +69,7 @@
</target>
<target name="testStatusCode307Redirect">
+ <sleep milliseconds="250"/>
<get src="${location}/307.txt" dest="${output}/307.txt"/>
<au:assertTrue>
<resourcecount count="1">
@@ -78,6 +83,7 @@
</target>
<target name="test5LevelsOfRedirect">
+ <sleep milliseconds="250"/>
<get src="${location}/redir5.txt" dest="${output}/redir5.tmp"/>
<au:assertTrue>
<resourcecount count="1">
@@ -95,6 +101,7 @@
<target name="testInfiniteRedirect" unless="jenkins">
+ <sleep milliseconds="250"/>
<au:expectfailure expectedmessage="More than 25 times redirected, giving
up">
<get src="${location}/infinite.txt" dest="${output}/infinite.tmp"/>
</au:expectfailure>
@@ -102,6 +109,7 @@
<target name="testNestedResources">
+ <sleep milliseconds="250"/>
<get dest="${output}/downloads">
<url url="https://ant.apache.org/index.html"/>
<url url="https://ant.apache.org/faq.html"/>
@@ -111,6 +119,7 @@
</target>
<target name="XtestRelativeRedirect">
+ <sleep milliseconds="250"/>
<get src="${location}/local.cgi" dest="${output}/other.tmp"/>
<au:assertTrue>
<resourcecount count="1">
@@ -125,7 +134,8 @@
<target name="testHttpToHttpsRedirect" description="Tests that a resource that's redirected
from HTTP to HTTPS works without an error. See bugzilla-62499 for
details">
- <get src="${location}/http-to-https.txt"
dest="${output}/http-to-https-redirect.tmp"/>
+ <sleep milliseconds="250"/>
+ <get src="${unsecurelocation}"
dest="${output}/http-to-https-redirect.tmp"/>
<au:assertFileExists file="${output}/http-to-https-redirect.tmp"/>
<au:assertTrue>
<resourcecontains resource="${output}/http-to-https-redirect.tmp"
substring="hello world"/>
diff --git a/src/tests/antunit/taskdefs/gunzip-test.xml
b/src/tests/antunit/taskdefs/gunzip-test.xml
index f8ec6d9..19ca0ce 100644
--- a/src/tests/antunit/taskdefs/gunzip-test.xml
+++ b/src/tests/antunit/taskdefs/gunzip-test.xml
@@ -39,6 +39,7 @@
</target>
<target name="testWithNonFileResourceToFile" depends="setup">
+ <sleep milliseconds="250"/>
<gunzip dest="${output}/greeting.txt">
<url url="https://ant.apache.org/webtest/gunzip/greeting.txt.gz"/>
</gunzip>
@@ -49,6 +50,7 @@
</target>
<target name="testWithNonFileResourceToDir" depends="setup">
+ <sleep milliseconds="250"/>
<gunzip dest="${output}">
<url url="https://ant.apache.org/webtest/gunzip/greeting.txt.gz"/>
</gunzip>