Skip to content

fix: make test_ping deterministic#730

Open
Krish0703-irl wants to merge 1 commit into
imDarshanGK:mainfrom
Krish0703-irl:fix-flaky-test-ping-521
Open

fix: make test_ping deterministic#730
Krish0703-irl wants to merge 1 commit into
imDarshanGK:mainfrom
Krish0703-irl:fix-flaky-test-ping-521

Conversation

@Krish0703-irl
Copy link
Copy Markdown

Description

Updated test_ping to use TestClient as a context manager instead of a global instance. This ensures proper startup/shutdown lifecycle handling and improves test reliability.

Related Issue

Fixes #521

Type of change

  • Bug fix
  • New feature / enhancement
  • Documentation update
  • Test addition
  • Refactor

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • I have added tests for new features (Level 2 and 3 issues)
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Test evidence

pytest tests/test_ping.py -v

============================== test session starts ==============================
...
tests/test_ping.py::test_ping PASSED
======================== 1 passed, 2 warnings in 0.53s =========================fix: make test_ping deterministic

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.

Fix flaky test_ping unit test

1 participant