MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / timeout_in_start

Function timeout_in_start

tests/all/cli_tests.rs:195–214  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194#[test]
195fn timeout_in_start() -> Result<()> {
196 let wasm = build_wasm("tests/all/cli_tests/iloop-start.wat")?;
197 let output = run_wasmtime_for_output(
198 &[
199 "run",
200 "-Wtimeout=1ms",
201 "-Ccache=n",
202 wasm.path().to_str().unwrap(),
203 ],
204 None,
205 )?;
206 assert!(!output.status.success());
207 assert_eq!(output.stdout, b"");
208 let stderr = String::from_utf8_lossy(&output.stderr);
209 assert!(
210 stderr.contains("wasm trap: interrupt"),
211 "bad stderr: {stderr}"
212 );
213 Ok(())
214}
215
216#[test]
217fn timeout_in_invoke() -> Result<()> {

Callers

nothing calls this directly

Calls 6

run_wasmtime_for_outputFunction · 0.85
OkFunction · 0.85
to_strMethod · 0.80
build_wasmFunction · 0.70
unwrapMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected