Skip to content

Refactor healthcheck tests to use one function #2254

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

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

mathbunnyru
Copy link
Member

Describe your changes

Issue ticket if applicable

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes


status = get_health(running_container)
if status == "healthy":
return status
Copy link
Member Author

Choose a reason for hiding this comment

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

Fast exit in case get_health reports the status is healthy

)

# giving some time to let the server start
finish_time = time.time() + 5
Copy link
Member Author

@mathbunnyru mathbunnyru Mar 20, 2025

Choose a reason for hiding this comment

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

5 is actually a bug here, because this way it tests nothing - if I put 5 in tests above they give an error, as it's not enough time for our containers


# giving some time to let the server start
finish_time = time.time() + 10
sleep_time = 1
Copy link
Member Author

Choose a reason for hiding this comment

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

Sleeping 1 second instead of 0.1, because otherwise we produce too much logs when running pytest directly

@mathbunnyru mathbunnyru merged commit 951dec9 into jupyter:main Mar 20, 2025
96 checks passed
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