Requests icon indicating copy to clipboard operation
Requests copied to clipboard

Improve test infrastructure

Open schlessera opened this issue 4 years ago • 1 comments

Most of the tests right now are doing remote requests against a custom server running on Heroku: https://requests-php-tests.herokuapp.com.

These remote requests are flaky as they tend to fail every once in a while.

To improve on that (and get most of the global networking stack out of the equation), we should look at pulling up a testing server within the GitHub Actions environment. In this way, the network requests would run internally within that virtualized environment, and the probability for failure is much lower.

As a bonus, we could also check whether there are any other uses of the Heroku app that we're unaware of. Maybe @rmccue can get a hold of the access logs?

schlessera avatar Jun 18 '21 10:06 schlessera

I don't think there's any logs available, but the problem is likely because the Heroku dynos can take a few minutes to spin up.

The main problem with running in a fully virtualised environment that I found was that for things like the proxy tests, it wasn't an accurate test of the actual system. Running a proper local setup with a real server like nginx might fix the problems I saw.

rmccue avatar Jun 18 '21 10:06 rmccue