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

Attempt to fix flaky shutdown test #2539

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

artem-shelkovnikov
Copy link
Member

@artem-shelkovnikov artem-shelkovnikov commented May 9, 2024

Maybe closes #2517

Not sure about the actual reason for the test to inconsistently fail, but the steps that I add generally don't make it worse:

  1. Change makes use of pre-defined test config file instead of using default one. There should not even be a default file on the host, but test depending on ephemereal config file is doomed to be flaky
  2. Mock Elasticsearch calls instead of making service attempt call it. This might actually be the problem - service keeps trying to connect and ignore shutdown procedure, let's see.

Due to 2. this test might actually show potential problem with shutdown for service that tries to connect to something non-existent while terminating at a very specific point in time, but I was unable to reproduce it locally.

Checklists

Pre-Review Checklist

  • this PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check config.yml.example)
  • this PR has a meaningful title
  • this PR links to all relevant github issues that it fixes or partially addresses
  • if there is no GH issue, please create it. Each PR should have a link to an issue
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • Added a label for each target release version (example: v7.13.2, v7.14.0, v8.0.0)

@artem-shelkovnikov artem-shelkovnikov requested a review from a team as a code owner May 9, 2024 11:47
@artem-shelkovnikov artem-shelkovnikov force-pushed the artem/fix-flaky-test-shutdown-called-on-shutdown-signal branch from 2f154fd to d36af98 Compare May 9, 2024 12:19
@artem-shelkovnikov artem-shelkovnikov marked this pull request as draft May 9, 2024 12:20
@artem-shelkovnikov artem-shelkovnikov force-pushed the artem/fix-flaky-test-shutdown-called-on-shutdown-signal branch from d36af98 to b0e0049 Compare May 10, 2024 09:26
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.

Flaky test: tests/test_service_cli.py::test_shutdown_called_on_shutdown_signal[Signals.SIGINT]
1 participant