Skip to content

Commit a51283b

Browse files
committed
Fix timeout test
1 parent c57f7a6 commit a51283b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

worker-sandbox/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
490490
let signal = controller.signal();
491491

492492
let fetch_fut = async {
493-
let fetch = Fetch::Url("https://miniflare.mocks/".parse().unwrap());
493+
let fetch = Fetch::Url("https://miniflare.mocks/delay".parse().unwrap());
494494
let mut res = fetch.send_with_signal(&signal).await?;
495495
let text = res.text().await?;
496496
Ok::<String, worker::Error>(text)

worker-sandbox/tests/mf.ts

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ mockAgent
88
.intercept({ path: "/" })
99
.reply(200, "cloudflare!");
1010

11+
mockAgent
12+
.get("https://miniflare.mocks")
13+
.intercept({ path: "/delay" })
14+
.reply(200, "cloudflare!")
15+
.delay(10000);
16+
1117
mockAgent
1218
.get("https://jsonplaceholder.typicode.com")
1319
.intercept({ path: "/todos/1" })

0 commit comments

Comments
 (0)