Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
170 stars 118 forks source link

Minor tweaks to HTTP tests found during Rust HTTP testing #5658

Closed LarryOsterman closed 1 month ago

LarryOsterman commented 1 month ago

Minor tweaks to HTTP tests found during testing.

While testing the Rust HTTP stack, a couple of bugs were discovered in the HTTP tests. Specifically, the tests which add a "123" header to the test assumed this would add 19 characters to the response buffer. This turns out to be an invalid assumption because the response includes the client IP address, and the client IP address is not stable if the client is using a VPN to access the azurehttpbin server.

Also, the cancelRequest test should early-out once it receives the expected operation cancelled rather than iterating through all 10 loops. The point of the loop is to cover the fact that the internet is somewhat unreliable, so once we've verified that cancellation works correctly, we can complete the test.

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.