Skip to content

tests: Wait until container is not in starting state anymore, before running health check#2810

Merged
casperklein merged 3 commits intomasterfrom
healtcheck-fix
Oct 2, 2022
Merged

tests: Wait until container is not in starting state anymore, before running health check#2810
casperklein merged 3 commits intomasterfrom
healtcheck-fix

Conversation

@casperklein
Copy link
Copy Markdown
Member

@casperklein casperklein commented Oct 2, 2022

Description

It seams, that Docker does not start a container immediately, after successfully running the docker run.. command. Therefor the 30 seconds wait time for the health test can be to low. Hopefully, adding three more seconds solve that issue.

Fixes: https://github.com/docker-mailserver/docker-mailserver/actions/runs/3162276455/jobs/5148743130#step:5:227

This fix now waits, until docker itself reports, that the container is not in the starting state anymore.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change that does improve existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (README.md or the documentation under docs/)
  • If necessary I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

It seams, that Docker does not start a container immediately, after successful running the `docker run..` command. Therefor the 30 seconds wait time for the health test can be to low. Hopefully, adding three more seconds solve that issue.
@casperklein casperklein self-assigned this Oct 2, 2022
@casperklein casperklein requested a review from a team October 2, 2022 08:22
@casperklein casperklein added this to the v11.2.0 milestone Oct 2, 2022
@casperklein casperklein enabled auto-merge (squash) October 2, 2022 08:23
@casperklein casperklein mentioned this pull request Oct 2, 2022
7 tasks
georglauterbach
georglauterbach previously approved these changes Oct 2, 2022
Copy link
Copy Markdown
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

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

While not pretty, I hope this does the job :)

@georglauterbach georglauterbach requested a review from a team October 2, 2022 10:00
@casperklein casperklein changed the title tests: Adding three more seconds to wait for health check tests: Wait until container is not in starting state, before running health check Oct 2, 2022
@casperklein casperklein changed the title tests: Wait until container is not in starting state, before running health check tests: Wait until container is not in starting state anymore, before running health check Oct 2, 2022
@casperklein
Copy link
Copy Markdown
Member Author

While not pretty, I hope this does the job :)

I decided for another approach, which hopefully will be bullet proof now.

Copy link
Copy Markdown
Member

@polarathene polarathene left a comment

Choose a reason for hiding this comment

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

Much nicer 👍

Copy link
Copy Markdown
Member

@georglauterbach georglauterbach left a comment

Choose a reason for hiding this comment

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

Indeed, much better - LGTM 👍

@casperklein casperklein merged commit c52211b into master Oct 2, 2022
@casperklein casperklein deleted the healtcheck-fix branch October 2, 2022 21:25
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