Skip to content

Commit ad6548c

Browse files
committed
Increase timeout for tests
1 parent e9a6440 commit ad6548c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎test/testServerThread.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ test("Injected scripts are served off the main thread", async (t) => {
187187
t.is(threaded.morphdom.body, single.morphdom.body);
188188
});
189189

190-
test("Requests are served while the main thread is blocked", async (t) => {
190+
// Serial: blocking the main thread would stall other tests in this file running at the same time
191+
test.serial("Requests are served while the main thread is blocked", async (t) => {
191192
// The probe has to run off the main thread, otherwise it would be blocked
192193
// alongside the server and the test would pass no matter what.
193194
const PROBE = `
@@ -306,7 +307,8 @@ test("A throwing middleware does not take down the server", async (t) => {
306307
await server.close();
307308
});
308309

309-
function withTimeout(promise, ms = 2000) {
310+
// Only catches hangs, so it's generous for slow CI machines
311+
function withTimeout(promise, ms = 10000) {
310312
return Promise.race([
311313
promise,
312314
new Promise((resolve, reject) => setTimeout(() => reject(new Error(`Timed out after ${ms}ms`)), ms)),

0 commit comments

Comments
 (0)