Skip to content

Commit a007650

Browse files
committed
Merge branch 'claude/fix-ci-main-branch-Bb6l1' into 'main'
fix(cli): increase PostgreSQL startup timeout to 30s in integration tests See merge request postgres-ai/postgres_ai!142
2 parents 47a5f0e + 3eb3720 commit a007650

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

cli/bunfig.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
# https://bun.sh/docs/runtime/bunfig
33

44
[test]
5-
# Default timeout for all tests (30 seconds)
5+
# Default timeout for all tests (60 seconds)
66
# Integration tests that connect to databases need longer timeouts
7-
timeout = 30000
7+
# PostgreSQL startup can take up to 30s in slow CI environments
8+
timeout = 60000
89

910
# Coverage settings - enabled by default for test runs
1011
coverage = true

cli/test/checkup.integration.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ async function createTempPostgres(): Promise<TempPostgres> {
131131
return c;
132132
};
133133

134-
// Wait for Postgres to start
134+
// Wait for Postgres to start (30s timeout for slower CI environments)
135135
await waitFor(async () => {
136136
const c = await connect();
137137
await c.end();
138-
});
138+
}, { timeoutMs: 30000, intervalMs: 100 });
139139

140140
return { port, socketDir, cleanup, connect };
141141
}
@@ -172,15 +172,16 @@ describe.skipIf(!!skipReason)("checkup integration: express mode schema compatib
172172
let pg: TempPostgres;
173173
let client: Client;
174174

175+
// 60s timeout for hooks - PostgreSQL startup can take 30s+ in slow CI
175176
beforeAll(async () => {
176177
pg = await createTempPostgres();
177178
client = await pg.connect();
178-
});
179+
}, { timeout: 60000 });
179180

180181
afterAll(async () => {
181182
if (client) await client.end();
182183
if (pg) await pg.cleanup();
183-
});
184+
}, { timeout: 60000 });
184185

185186
// Test all checks supported by express mode
186187
const expressChecks = Object.keys(checkup.CHECK_INFO);

cli/test/init.integration.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ async function createTempPostgres(): Promise<TempPostgres> {
137137
return c;
138138
};
139139

140+
// Wait for Postgres to start (30s timeout for slower CI environments)
140141
await waitFor(async () => {
141142
const c = await connectLocal();
142143
await c.end();
143-
});
144+
}, { timeoutMs: 30000, intervalMs: 100 });
144145

145146
const postgresPassword = "postgrespw";
146147
{

0 commit comments

Comments
 (0)