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

ci: fix infinite loop on wait-up step #2348

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

wellwelwel
Copy link
Collaborator

Currently, the tools/wait-up.js test only recognizes an error when the MySQL Server returns a connection error, but if there is another type of error, it continues the loop infinitely:

if (err.code !== 'PROTOCOL_CONNECTION_LOST' && err.code !== 'ETIMEDOUT' && err.code !== 'ECONNREFUSED') {
console.log('Unexpected error waiting for connection', err);
process.exit(-1);
}

This PR sets a maximum limit of 5 minutes if the connection is not established.

Reviewing this step (CI) on all OS systems, the time takes between 1 second and ~2 minutes, so I've chosen to set the limit at twice the longest time.

@wellwelwel wellwelwel merged commit 96e6a5b into sidorares:master Jan 9, 2024
57 checks passed
@wellwelwel wellwelwel deleted the ci branch January 9, 2024 02:20
@wellwelwel wellwelwel mentioned this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant