|
20 | 20 | <import file="../antunit-base.xml" /> |
21 | 21 |
|
22 | 22 | <property name="location" value="https://ant.apache.org/webtest/gettest" /> |
| 23 | + <property name="unsecurelocation" value="http://ant.apache.org/webtest/gettest/http-to-https.txt" /> |
23 | 24 |
|
24 | 25 | <target name="setUp"> |
25 | 26 | <mkdir dir="${output}" /> |
26 | 27 | </target> |
27 | 28 |
|
28 | 29 | <target name="testSeeOtherRedirect"> |
| 30 | + <sleep milliseconds="250"/> |
29 | 31 | <get src="${location}/other.txt" dest="${output}/other.tmp"/> |
30 | 32 | <au:assertTrue> |
31 | 33 | <resourcecount count="1"> |
|
39 | 41 | </target> |
40 | 42 |
|
41 | 43 | <target name="testPermanentRedirect"> |
| 44 | + <sleep milliseconds="250"/> |
42 | 45 | <get src="${location}/permanent.txt" dest="${output}/permanent.tmp"/> |
43 | 46 | <au:assertTrue> |
44 | 47 | <resourcecount count="1"> |
|
52 | 55 | </target> |
53 | 56 |
|
54 | 57 | <target name="testTemporaryRedirect"> |
| 58 | + <sleep milliseconds="250"/> |
55 | 59 | <get src="${location}/temp.txt" dest="${output}/temp.txt"/> |
56 | 60 | <au:assertTrue> |
57 | 61 | <resourcecount count="1"> |
|
65 | 69 | </target> |
66 | 70 |
|
67 | 71 | <target name="testStatusCode307Redirect"> |
| 72 | + <sleep milliseconds="250"/> |
68 | 73 | <get src="${location}/307.txt" dest="${output}/307.txt"/> |
69 | 74 | <au:assertTrue> |
70 | 75 | <resourcecount count="1"> |
|
78 | 83 | </target> |
79 | 84 |
|
80 | 85 | <target name="test5LevelsOfRedirect"> |
| 86 | + <sleep milliseconds="250"/> |
81 | 87 | <get src="${location}/redir5.txt" dest="${output}/redir5.tmp"/> |
82 | 88 | <au:assertTrue> |
83 | 89 | <resourcecount count="1"> |
|
95 | 101 |
|
96 | 102 |
|
97 | 103 | <target name="testInfiniteRedirect" unless="jenkins"> |
| 104 | + <sleep milliseconds="250"/> |
98 | 105 | <au:expectfailure expectedmessage="More than 25 times redirected, giving up"> |
99 | 106 | <get src="${location}/infinite.txt" dest="${output}/infinite.tmp"/> |
100 | 107 | </au:expectfailure> |
101 | 108 | </target> |
102 | 109 |
|
103 | 110 |
|
104 | 111 | <target name="testNestedResources"> |
| 112 | + <sleep milliseconds="250"/> |
105 | 113 | <get dest="${output}/downloads"> |
106 | 114 | <url url="https://ant.apache.org/index.html"/> |
107 | 115 | <url url="https://ant.apache.org/faq.html"/> |
|
111 | 119 | </target> |
112 | 120 |
|
113 | 121 | <target name="XtestRelativeRedirect"> |
| 122 | + <sleep milliseconds="250"/> |
114 | 123 | <get src="${location}/local.cgi" dest="${output}/other.tmp"/> |
115 | 124 | <au:assertTrue> |
116 | 125 | <resourcecount count="1"> |
|
125 | 134 |
|
126 | 135 | <target name="testHttpToHttpsRedirect" description="Tests that a resource that's redirected |
127 | 136 | from HTTP to HTTPS works without an error. See bugzilla-62499 for details"> |
128 | | - <get src="${location}/http-to-https.txt" dest="${output}/http-to-https-redirect.tmp"/> |
| 137 | + <sleep milliseconds="250"/> |
| 138 | + <get src="${unsecurelocation}" dest="${output}/http-to-https-redirect.tmp"/> |
129 | 139 | <au:assertFileExists file="${output}/http-to-https-redirect.tmp"/> |
130 | 140 | <au:assertTrue> |
131 | 141 | <resourcecontains resource="${output}/http-to-https-redirect.tmp" substring="hello world"/> |
|
0 commit comments