-
Notifications
You must be signed in to change notification settings - Fork 145
chore: migrate conformance test runner to tokio #2180
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the conformance test runner from the async-std
runtime to Tokio’s multi-threaded runtime and simplifies the async flow by using tokio::task::spawn_blocking
and futures::stream
for concurrency control. It also converts the run_vector
function to a synchronous API, updates test vector parsing, and adjusts dependencies accordingly.
- Swap out
async-std
for Tokio and usebuffer_unordered
for parallel test execution - Refactor
run_vector
to return results synchronously and launch it viaspawn_blocking
- Update dependency manifests to remove
async-std
and add Tokio
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
testing/conformance/tests/runner.rs | Replaced async-std with Tokio, refactored vector runner |
testing/conformance/src/vector.rs | Made seed_blockstore synchronous |
testing/conformance/src/lib.rs | Extended report! macro to include failure reasons |
testing/conformance/src/actors.rs | Simplified load_bundles by removing intermediate buffer |
testing/conformance/benches/bench_drivers.rs | Updated bench to call sync seed_blockstore |
testing/conformance/Cargo.toml | Removed async-std , moved futures and added tokio |
Comments suppressed due to low confidence (2)
testing/conformance/Cargo.toml:24
- The
futures
crate was removed from[dependencies]
but is still used inrunner.rs
. Please re-addfutures = "0.3.31"
to[dependencies]
so that the production code compiles.
wasmtime = { workspace = true }
testing/conformance/tests/runner.rs:177
- The doc comment still refers to returning a list of
VectorResult
s but the function now returns a(PathBuf, Vec<VariantResult>)
tuple. Please update the comment to match the new signature.
/// Runs a single test vector and returns a list of VectorResults,
Would close #2144 when ported to v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Switch from async-std to tokio runtime and maintain rough test execution time while simplifying the async implementation. Ref: #2173
0090c1c
to
15fdfa8
Compare
Switch from async-std to tokio runtime and maintain rough test execution time while simplifying the async implementation.
This builds on some of the simplifying work that went in to #2173, but aborts on the use of rayon because of the mutex contention issues that involved. It doesn't make all of the async complexity go away, we use
tokio::task::spawn_blocking
to run the tasks and usebuffer_unordered
to control our concurrency, but we don't lose as much code as #2173 did (+148 −641
vs+166 −460
and the wholeTEST_VECTOR_PARALLELISM
thing still exists here).