Skip to content

Commit

Permalink
test1540: improve reliability
Browse files Browse the repository at this point in the history
- print that bytes have been received on pausing, but not how many

Closes #12069
  • Loading branch information
icing authored and bagder committed Oct 9, 2023
1 parent 56d3730 commit a383d13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/data/test1540
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ HTTP/1.1 200 OK swsclose
Transfer-Encoding: chunked
Trailer: MyCoolTrailerHeader

Got 4 bytes but pausing!
Got bytes but pausing!
datad474
MyCoolTrailerHeader: amazingtrailer
</datacheck>
Expand Down
3 changes: 2 additions & 1 deletion tests/libtest/lib1540.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp)
fwrite(ptr, size, nmemb, stdout);
return len;
}
printf("Got %d bytes but pausing!\n", (int)len);
if(len)
printf("Got bytes but pausing!\n");
st->halted = 1;
return CURL_WRITEFUNC_PAUSE;
}
Expand Down

0 comments on commit a383d13

Please sign in to comment.