Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI workflow to await database #181

Merged

Conversation

SimonFrings
Copy link
Contributor

@SimonFrings SimonFrings commented Nov 6, 2023

We recently encountered failing test runs in our CI matrix with an error response like this (nearly all tests failed with this same error response):
image

These failures occurred only occasionally, indicating some kind of race condition. A while ago, we introduced the
wait-for-mysql.sh file in pull request #132. This file waits for the internal database to be ready to handle SQL queries before running our PHPUnit tests. However, while this file waited for the internal part of Docker to be ready, the external port was always opened just moments after the database became ready to handle SQL queries. As a result, our test suite failed because the tests couldn't establish a connection to the database.

This pull request now fixes this issue by explicitly using the --host & --port configuration option. I tested this in my fork by running the test suite multiple times without encountering any failures.

Builds on top of #132 and others

@clue clue added this to the v0.6.0 milestone Nov 6, 2023
@clue clue requested a review from WyriHaximus November 6, 2023 14:04
Copy link
Contributor

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SimonFrings Thanks for the update, changes LGTM! :shipit:

Copy link
Member

@WyriHaximus WyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@WyriHaximus WyriHaximus merged commit 420ad29 into friends-of-reactphp:0.6.x Nov 6, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants