A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Fix the hello-stdout-post-return-test (#12569)
Alex Crichtonfcc888ace9d2
diff --git a/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs b/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rsindex 6c52e15aa6..1b0b5ab2f9 100644--- a/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs+++ b/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs@@ -7,23 +7,19 @@ export!(Component);impl exports::wasi::cli::run::Guest for Component {async fn run() -> Result<(), ()> {let (mut tx, rx) = wit_stream::new();- futures::join!(- async {- wasi::cli::stdout::write_via_stream(rx).await.unwrap();- },- async {- tx.write_all(b"hello, world\n".to_vec()).await;- wit_bindgen::spawn(async move {- // Yield a few times to allow the host to accept and process- // the `run` result.- for _ in 0..10 {- wit_bindgen::yield_async().await;- }- tx.write_all(b"hello again, after return\n".to_vec()).await;- drop(tx);- });- },- );+ wit_bindgen::spawn(async move {+ wasi::cli::stdout::write_via_stream(rx).await.unwrap();+ });+ tx.write_all(b"hello, world\n".to_vec()).await;+ wit_bindgen::spawn(async move {+ // Yield a few times to allow the host to accept and process+ // the `run` result.+ for _ in 0..10 {+ wit_bindgen::yield_async().await;+ }+ tx.write_all(b"hello again, after return\n".to_vec()).await;+ drop(tx);+ });Ok(())}}