]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: add some --expect100-timeout to reduce timing dependencies
authorDan Fandrich <dan@coneharvesters.com>
Mon, 11 Sep 2023 22:28:01 +0000 (15:28 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 13 Sep 2023 18:26:08 +0000 (11:26 -0700)
These tests can fail when the test machine is so slow that the test HTTP
server didn't get a chance to complete before the client's one second
100-continue timeout triggered. Increase that 1 second to 999 seconds so
this situation doesn't happen.

Ref: #11328

tests/data/test1130
tests/data/test1131
tests/data/test357

index 233562546a14b5fcdc8df5dc906b9a56826dfcd8..1107941896198cc42e821078105025f6ce9895ce 100644 (file)
@@ -30,8 +30,9 @@ Content-Type: text/html
 -foo-
 </data1>
 
-# we use skip to make the test server never read the full payload off
-# the socket and instead return the response at once
+# We use skip to make the test server never read the full payload off
+# the socket and instead return the response at once. In actuality, the
+# long --expect100-timeout means that it will never get a chance to read this.
 <servercmd>
 skip: 100
 </servercmd>
@@ -51,7 +52,7 @@ http
 HTTP POST forced expect 100-continue with a 404
  </name>
  <command option="no-output">
--d @%LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue"
+-d @%LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 -H "Expect: 100-continue" --expect100-timeout 999
 </command>
 </client>
 
index 3235bf5df477d0eadb085b0612c9c6d5470cd09b..5725e71eb82ce04aa265b8d9d234b293813dbdae 100644 (file)
@@ -30,8 +30,9 @@ Content-Type: text/html
 FAILURE2
 </data1>
 
-# we use skip to make the test server never read the full payload off
-# the socket and instead return the response at once
+# We use skip to make the test server never read the full payload off
+# the socket and instead return the response at once. In actuality, the
+# long --expect100-timeout means that it will never get a chance to read this.
 <servercmd>
 skip: 100
 </servercmd>
@@ -51,7 +52,7 @@ http
 HTTP PUT expect 100-continue with a 400
  </name>
  <command option="no-output">
--H "Expect: 100-continue" -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001
+-H "Expect: 100-continue" -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T %LOGDIR/file%TESTNUMBER http://%HOSTIP:%HTTPPORT/%TESTNUMBER0001 --expect100-timeout 999
 </command>
 </client>
 
index 445000768c6b5f841b4d6ac5489e85aedaa2bf03..5d1f456a3b08a45d0a8d2075b613dee4fcbf6161 100644 (file)
@@ -51,7 +51,7 @@ http
 HTTP PUT with Expect: 100-continue and 417 response
  </name>
  <command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T %LOGDIR/test%TESTNUMBER.txt
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -T %LOGDIR/test%TESTNUMBER.txt --expect100-timeout 999
 </command>
 # 1053700 x 'x', large enough to invoke the 100-continue behaviour
 <file name="%LOGDIR/test%TESTNUMBER.txt">