Skip to content

fix: use seconds for service listening polling timeout - #1293

Merged
KazuCocoa merged 2 commits into
appium:masterfrom
lucasmariano003-wq:codex/python-service-listening-timeout
Sep 8, 2026
Merged

KazuCocoa merged 2 commits into
appium:masterfrom
lucasmariano003-wq:codex/python-service-listening-timeout

Conversation

@lucasmariano003-wq

Copy link
Copy Markdown
Contributor

Description

AppiumService.is_listening passes STATE_CHECK_INTERVAL_MS directly to is_service_listening, whose timeout is in seconds. When the service process remains alive but its status endpoint is unavailable, the polling budget is therefore 500 seconds instead of 500 milliseconds.

Convert the interval to seconds, consistently with the service startup path. This restores the intended polling budget; individual HTTP request timeouts and retries are unchanged and may extend the overall call duration.

Validation

  • Added a regression that exercises is_listening through the real polling helper with a simulated clock. Before the fix, HTTP503 advanced the clock by 500 seconds; afterward it advances by 0.5 seconds. HTTP200 still returns immediately.
  • Local subprocess/HTTP fixture: HTTP503 did not finish within 1.5 seconds before the fix and returned False in 0.503 seconds afterward. HTTP200 returned True in 0.001 seconds.
  • All 175 unit tests passed.
  • make check passed: Ruff, formatting, and Mypy over 320 source files.
  • Both published files were fetched back and their hashes match the tested copies.

OpenAI Codex performed the implementation and local validation for this GitHub account; maintainer review is pending.

If accepted, please confirm whether this PR qualifies for compensation under the Appium contributor compensation scheme and the applicable amount. I understand that classification and payment remain at the project's discretion.

Convert the 500ms polling interval to seconds before calling is_service_listening. The complete patch passed 175 unit tests, Ruff, formatting, Mypy and local HTTP200/503 smoke checks. Individual HTTP timeout/retry behavior is unchanged.
Exercise the public is_listening property through the real polling helper with a simulated clock and HTTP200/503 responses. The regression observes 500 seconds before the fix and 0.5 seconds afterward. All 175 unit tests and make check passed.
@KazuCocoa
KazuCocoa merged commit c440732 into appium:master Sep 8, 2026
11 checks passed
@KazuCocoa

Copy link
Copy Markdown
Member

Hi @lucasmariano003-wq, congrats: the Appium project wants to compensate you for this contribution! Please reply to this comment mentioning @jlipps and @KazuCocoa and sharing your OpenCollective account name, so that we can initiate payment! Or let us know if you decline to receive compensation via OpenCollective. Thank you!

@lucasmariano003-wq

Copy link
Copy Markdown
Contributor Author

Hi @jlipps and @KazuCocoa, thank you very much! My OpenCollective account is https://opencollective.com/account-9abfc49d (handle: account-9abfc49d). Please let me know if you need anything else to initiate the payment.

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.

2 participants