Skip to content

Commit 3331d47

Browse files
author
Constructive
committed
fix(ci): give PGlite WASM cold-start room (beforeAll + testTimeout 120s)
The pgvector beforeAll timed out on a cold CI runner: loading the vector WASM extension pushed getConnections() past Jest's default 5s hook timeout, so teardown was undefined and the suite failed. Add an explicit 120s hook timeout and testTimeout to both packages.
1 parent 570a06f commit 3331d47

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

packages/hello-world/__tests__/hello-world.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ beforeAll(async () => {
1818
{ pglite: { extensionSql: ['CREATE ROLE authenticated;'] } },
1919
[seed.pgpm(__dirname + '/..')]
2020
));
21-
});
21+
}, 120000);
2222

2323
afterAll(async () => {
2424
await teardown();

packages/hello-world/jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ module.exports = {
1212
watchPathIgnorePatterns: ['/dist/'],
1313

1414
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
15+
16+
// PGlite loads a WASM module; the first getConnections() can be slow on a cold CI runner.
17+
testTimeout: 120000,
1518
};

packages/pgvector/__tests__/pgvector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ beforeAll(async () => {
1818
},
1919
[seed.pgpm(__dirname + '/..')]
2020
));
21-
});
21+
}, 120000);
2222

2323
afterAll(async () => {
2424
await teardown();

packages/pgvector/jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ module.exports = {
1212
watchPathIgnorePatterns: ['/dist/'],
1313

1414
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
15+
16+
// PGlite loads a WASM module; the first getConnections() can be slow on a cold CI runner.
17+
testTimeout: 120000,
1518
};

0 commit comments

Comments
 (0)