Skip to content

test(gateway): take any whole seconds in a deploy's websites-not-ready message - #551

Merged
earakely-scale merged 1 commit into
mainfrom
edgararakelyan/test-gateway-website-elapsed
Nov 9, 2026
Merged

earakely-scale merged 1 commit into
mainfrom
edgararakelyan/test-gateway-website-elapsed

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

When a website isn't ready in time, _wait_for_websites fails the deploy saying how long it waited: "websites not ready after %ds: …", measured with time.monotonic() and rounded down to whole seconds. Three tests in env_gateway_provider_test.py matched after 0s, which holds only while the wait takes under a second:

  • test_a_site_that_never_says_it_is_ready_fails_the_deploy_naming_why
  • test_a_site_whose_ready_answers_no_website_readiness_is_never_ready_and_the_deploy_says_so
  • test_a_site_past_the_time_it_declared_fails_the_deploy_saying_so

On a loaded runner the wait took a second. CodeBuild's unit run for #547 failed with Actual message: 'websites not ready after 1s: mail (not ready after 0 s: @ready_check seeded returned False)' (1 failed, 13,982 passed). The same tests passed on that PR's previous commit and in GitHub's unit jobs.

The three tests now match after \d+s. The rest of each message is still matched exactly, including the site's own not ready after 0 s, which comes from its answer, not the clock. No code changes.

Testing

  • The provider's website tests pass locally: 39 passed.
  • ruff check is clean.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

The PR removes a timing assumption from three website-readiness tests.

  • Website readiness tests accept any elapsed whole-second count.

Reviews (1) · Last reviewed commit: "test(gateway): take any whole seconds in..." · Reviewed by Greptile

…y message

_wait_for_websites says how long it waited, the time measured, in whole seconds. Three tests matched
"after 0s", which holds only while the wait takes under a second; on a loaded runner it took one, and
CodeBuild's unit run failed on "websites not ready after 1s". They now match any whole seconds, and
still match the rest of the message exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale requested a review from a team as a code owner November 9, 2026 04:30
@earakely-scale
earakely-scale merged commit 7d82d10 into main Nov 9, 2026
34 checks passed
@earakely-scale
earakely-scale deleted the edgararakelyan/test-gateway-website-elapsed branch November 9, 2026 05:24
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