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

test_runner: improve wait_until #9936

Merged
merged 7 commits into from
Dec 2, 2024
Merged

test_runner: improve wait_until #9936

merged 7 commits into from
Dec 2, 2024

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Nov 29, 2024

Improves wait_until by:

  • Use timeout instead of iterations. This allows changing the timeout/interval parameters independently.
  • Make timeout and interval optional (default 20s and 0.5s). Most callers don't care.
  • Only output status every 1s by default, and add optional status_interval parameter.
  • Remove show_intermediate_error, this was always emitted anyway.

Most callers have been updated to use the defaults, except where they had good reason otherwise.

@erikgrinaker erikgrinaker requested a review from jcsp November 29, 2024 11:40
Copy link

github-actions bot commented Nov 29, 2024

7018 tests run: 6710 passed, 0 failed, 308 skipped (full report)


Flaky tests (1)

Postgres 15

Code coverage* (full report)

  • functions: 30.4% (8276 of 27226 functions)
  • lines: 47.8% (65239 of 136512 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
5e7ca9d at 2024-12-02T10:26:58.081Z :recycle:

Copy link
Collaborator

@jcsp jcsp left a comment

Choose a reason for hiding this comment

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

I'm in favour, always found this function kind of weird.

One note of caution: the use of defaults in so many places means that these default values are going to become somewhat sacred, as ever changing them will likely destabilise some tests.

@erikgrinaker
Copy link
Contributor Author

One note of caution: the use of defaults in so many places means that these default values are going to become somewhat sacred, as ever changing them will likely destabilise some tests.

Yeah, that's always a risk here. I figure 20 seconds is enough to cover practically all common cases and still low enough not to be annoying. Many of the explicit timeouts were also either 20 or 30 seconds, and this seemed to have been mostly arbitrary.

@erikgrinaker
Copy link
Contributor Author

Will hold off on this until Monday, to avoid any weekend CI breakage.

@erikgrinaker erikgrinaker added this pull request to the merge queue Dec 2, 2024
Merged via the queue into main with commit 5330122 Dec 2, 2024
86 checks passed
@erikgrinaker erikgrinaker deleted the erik/wait-until branch December 2, 2024 10:28
awarus pushed a commit that referenced this pull request Dec 5, 2024
Improves `wait_until` by:

* Use `timeout` instead of `iterations`. This allows changing the
timeout/interval parameters independently.
* Make `timeout` and `interval` optional (default 20s and 0.5s). Most
callers don't care.
* Only output status every 1s by default, and add optional
`status_interval` parameter.
* Remove `show_intermediate_error`, this was always emitted anyway.

Most callers have been updated to use the defaults, except where they
had good reason otherwise.
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.

3 participants