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

[wptrunner] Optimize server test order #46331

Conversation

jonathan-j-lee
Copy link
Contributor

TestEnvironment.ensure_started() synchronously polls that all servers are started. The non-webtransport-h3 servers are often tested first and immediately fail with "Connection refused", which puts them in the pending list. This spins the polling loop at least once and delays startup by at least 0.5s.

Run the webtransport-h3 server test first, which blocks. This provides additional time for the non-webtransport-h3 servers to become ready, which means the TestEnvironment often only needs to poll once.

This speeds up ensure_started() from ~2.2s -> ~1.7s and improves wptrunner's interactive UX (https://crbug.com/339299999). No functional change.

`TestEnvironment.ensure_started()` synchronously polls that all servers
are started. The non-webtransport-h3 servers are often tested first and
immediately fail with "Connection refused", which puts them in the
`pending` list. This spins the polling loop at least once and delays
startup by at least 0.5s.

Run the webtransport-h3 server test first, which blocks [1]. This
provides additional time for the non-webtransport-h3 servers to become
ready, which means the `TestEnvironment` often only needs to poll once.

This speeds up `ensure_started()` from ~2.2s -> ~1.7s and improves
wptrunner's interactive UX (https://crbug.com/339299999). No functional
change.

[1]: https://github.com/web-platform-tests/wpt/blob/431f8d35/tools/webtransport/h3/webtransport_h3_server.py#L593
@jonathan-j-lee jonathan-j-lee marked this pull request as ready for review May 16, 2024 21:47
@wpt-pr-bot wpt-pr-bot added infra wptrunner The automated test runner, commonly called through ./wpt run labels May 16, 2024
@jonathan-j-lee
Copy link
Contributor Author

The failures afflict other PRs (e.g., #46333, #46292), so it's unlikely this very narrow PR is the culprit. Also, the Azure versions of the tests are all green.

@KyleJu @DanielRyanSmith Can either of you please admin merge? Thanks!

@DanielRyanSmith DanielRyanSmith merged commit c6298d4 into web-platform-tests:master May 16, 2024
32 of 35 checks passed
@jonathan-j-lee jonathan-j-lee deleted the wptrunner/optimize-server-test branch May 17, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra wptrunner The automated test runner, commonly called through ./wpt run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants