Files
nutshell/tests
conduition d12a8d1bde wait for uvicorn server to bind before running tests (#607)
* wait for uvicorn server to bind before running tests

Previously we had a simple `time.sleep(1)` call after `server.start()`
which was present to give the Mint's HTTP server time to spin up during
test runs. This meant that if the server took longer than 1s to start
on a dev's machine for any reason (even intermittently) then tests would
fail due to connection errors.

The fix is to use a simple repeated polling check which allows
the test runner to start only once the server is confirmed listening.

* fix linter errors

* prevent infinite loop

* specifically except httpx.ConnectError

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>

---------

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2024-10-20 01:01:32 +02:00
..
2024-09-24 14:55:35 +02:00
2024-03-29 22:34:51 +01:00
2024-09-24 14:55:35 +02:00
2024-09-24 14:55:35 +02:00
2024-09-24 14:55:35 +02:00
2024-09-09 11:50:02 +02:00
2023-11-09 17:03:45 -03:00
2024-09-24 14:55:35 +02:00
2024-09-24 14:55:35 +02:00