Make streaming probe timing runtime-independent

This commit is contained in:
ms2k 2026-08-15 21:04:55 +09:00
commit e8ee006b20

View file

@ -162,7 +162,7 @@ verifyThrottle context session directory = do
prestart <- curlUploadBytesDeclared prestart <- curlUploadBytesDeclared
context sessionB "prestart.bin" context sessionB "prestart.bin"
"71000000-0000-4000-8000-000000000002" "71000000-0000-4000-8000-000000000002"
1 uploadDigest "x" 65536 uploadDigest "x"
assertEqual assertEqual
("pre-start upload throttle: " <> B8.unpack (probeBody prestart)) ("pre-start upload throttle: " <> B8.unpack (probeBody prestart))
429 429
@ -370,7 +370,8 @@ interruptedUpload context session path operationId size digest bodyPath = do
[ "--insecure" [ "--insecure"
, "--silent" , "--silent"
, "--show-error" , "--show-error"
, "--max-time", "1" , "--header", "Expect:"
, "--max-time", "2"
, "--limit-rate", "64k" , "--limit-rate", "64k"
, "--request", "POST" , "--request", "POST"
, "--upload-file", bodyPath , "--upload-file", bodyPath
@ -390,7 +391,7 @@ interruptedDownload context session outputPath = do
[ "--insecure" [ "--insecure"
, "--silent" , "--silent"
, "--show-error" , "--show-error"
, "--max-time", "1" , "--max-time", "2"
, "--limit-rate", "64k" , "--limit-rate", "64k"
, "--header", "Cookie: " <> B8.unpack cookies , "--header", "Cookie: " <> B8.unpack cookies
, "--output", outputPath , "--output", outputPath