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

test: use a more reliable service pid detection #2673

Merged

Conversation

reubenmiller
Copy link
Contributor

@reubenmiller reubenmiller commented Feb 4, 2024

Proposed changes

Due to some flake-finder runs, it was found that the assertions which rely on getting a service's main PID can suffer from race conditions if there is a delay between starting a service and getting the pid via pgrep. Instead the Service Should Be Running keyword also returns the PID of the running service, so it does not assume that the service is running "now", but will wait if necessary if the service is not already running.

image

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
…e main PID of the service

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Copy link
Contributor

github-actions bot commented Feb 4, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
390 0 3 390 100 57m2.546999999s

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

@reubenmiller reubenmiller added this pull request to the merge queue Feb 5, 2024
Merged via the queue into thin-edge:main with commit 93ea7e4 Feb 5, 2024
18 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.

None yet

3 participants