]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1513: eliminated race condition in test run
authorDan Fandrich <dan@coneharvesters.com>
Sat, 21 Mar 2015 22:57:32 +0000 (23:57 +0100)
committerDan Fandrich <dan@coneharvesters.com>
Sat, 21 Mar 2015 23:03:44 +0000 (00:03 +0100)
It seems that some systems (e.g. fairly consistently in some recent
Solaris autobuilds) would manage to get to the connect phase before the
progress callback was called, resulting in a CURLE_COULDNT_CONNECT
error. Reworked the test to point at a test server that never returns a
full result so the progress callback always gets a chance to be called
before the transfer can complete in some other way.

tests/data/test1513

index 4a63f18064a19fbc7c97e17bb005a3a6812d12e6..8abb96fa608b4467616b142c09e3d67bcf86d984 100644 (file)
@@ -7,16 +7,20 @@ PROGRESSFUNCTION
 
 # Server-side
 <reply>
+<data nocheck="yes">
+HTTP/1.1 204 PARTIAL\r
+X-Comment: partial response to keep the client waiting\r
+</data>
+<postcmd>
+wait 10
+</postcmd>
 </reply>
 
 # Client-side
 <client>
 <server>
-none
-</server>
-<features>
 http
-</features>
+</server>
 <tool>
 lib1513
 </tool>
@@ -26,7 +30,7 @@ return failure immediately from progress callback
 
 # this server/host won't be used for real
  <command>
-http://localhost/1513
+http://%HOSTIP:%HTTPPORT/1513
 </command>
 </client>