aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-22 07:09:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-22 07:09:47 +0000
commit38dc548a87534b9b3e0c862e39716d3188b70f88 (patch)
tree809d5c2d56c99aea77baad3d8565d1ef371b4d22 /tests
parentdca63862340e29511f056c9430f18b5d7c138003 (diff)
retry to read the sent request a few times if it doesn't exist the first time
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 4c32df7b4..de7e6088c 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -1161,8 +1161,22 @@ sub singletest {
}
if(@protocol) {
- # verify the sent request
- my @out = loadarray($SERVERIN);
+ my @out;
+ my $retry = 5;
+
+ # Verify the sent request. Sometimes, like in test 513 on some hosts,
+ # curl will return back faster than the server writes down the request
+ # to its file, so we might need to wait here for a while to see if the
+ # file gets written a bit later.
+
+ while($retry--) {
+ @out = loadarray($SERVERIN);
+
+ if(!$out[0]) {
+ # nothing there yet, wait a while and try again
+ sleep(1);
+ }
+ }
# what to cut off from the live protocol sent by curl
my @strip = getpart("verify", "strip");