File tree Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Expand file tree Collapse file tree 2 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 88 - " CONTRIBUTING.md"
99 workflow_dispatch :
1010
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
1115env :
1216 CARGO_TERM_COLOR : always
1317 WASI_SDK_VERSION : 20.46gf3a1f8991535
Original file line number Diff line number Diff line change @@ -77,27 +77,10 @@ fn http_example() -> anyhow::Result<()> {
7777 let mut handle = std:: process:: Command :: new ( "wasmtime" )
7878 . current_dir ( & path)
7979 . args ( [ "serve" , "--wasi" , "common" , "http.wasm" ] )
80- . stderr ( Stdio :: piped ( ) )
8180 . spawn ( ) ?;
8281
83- let mut buf = [ 0 ; 36 ] ;
84- let mut stderr = handle. stderr . take ( ) . unwrap ( ) ;
85-
86- // Read until "Serving HTTP" shows up on Unix
87- // (stderr blocks on windows)
88- #[ cfg( unix) ]
89- retry (
90- || -> anyhow:: Result < ( ) > {
91- if stderr. read ( & mut buf) ? == 0 {
92- return Err ( anyhow:: anyhow!( "No data" ) ) ;
93- }
94- if !String :: from_utf8 ( buf. to_vec ( ) ) ?. contains ( "Serving HTTP on http://0.0.0.0:8080/" ) {
95- return Err ( anyhow:: anyhow!( "Wrong output" ) ) ;
96- }
97- Ok ( ( ) )
98- } ,
99- 10 ,
100- ) ?;
82+ // Sleep a bit to give the server time to start
83+ std:: thread:: sleep ( Duration :: from_secs ( 3 ) ) ;
10184
10285 let content = "’Twas brillig, and the slithy toves
10386 Did gyre and gimble in the wabe:
You can’t perform that action at this time.
0 commit comments