If MySQL takes >1s to start, which happens with some regularity in CI, the tests will not execute and a database connection error will be displayed in the test logs.
Instead of "sleep 1," retry every second for 5s or until mysql starts.
This logic could probably improved, but this consistently allows the tests to run once mysql is available on my local, where before it would only succeed ~60% of the time.
If MySQL takes >1s to start, which happens with some regularity in CI, the tests will not execute and a database connection error will be displayed in the test logs.
Instead of "sleep 1," retry every second for 5s or until mysql starts.
This logic could probably improved, but this consistently allows the tests to run once mysql is available on my local, where before it would only succeed ~60% of the time.
See #10