Skip to content

Commit ca2c92a

Browse files
kevin-dpclaude
andcommitted
fix: increase electron persisted collection E2E timeout for full mode
The renderer-side persistence adapter was using the default 5s timeout, causing CI failures when running real Electron IPC. Align with the 45s timeout already used by the other electron E2E tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1c7a974 commit ca2c92a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

packages/db-electron-sqlite-persisted-collection/tests/electron-persisted-collection.e2e.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,17 @@ type InvokeHarness = {
4646
}
4747

4848
let config: ElectronPersistedCollectionTestConfig | undefined
49+
const runFullE2E = isElectronFullE2EEnabled()
50+
const requestTimeoutMs = runFullE2E ? 45_000 : 5_000
4951

5052
function createInvokeHarness(dbPath: string): InvokeHarness {
51-
if (isElectronFullE2EEnabled()) {
53+
if (runFullE2E) {
5254
return {
5355
invoke: createElectronRuntimeBridgeInvoke({
5456
dbPath,
5557
collectionId: `seed`,
5658
allowAnyCollectionId: true,
57-
timeoutMs: 12_000,
59+
timeoutMs: requestTimeoutMs,
5860
}),
5961
close: () => {},
6062
}
@@ -122,6 +124,7 @@ function createPersistedCollection<T extends PersistableRow>(
122124
): PersistedCollectionHarness<T> {
123125
const persistence = createElectronSQLitePersistence<T, string | number>({
124126
invoke,
127+
timeoutMs: requestTimeoutMs,
125128
})
126129
let seedSequence = 0
127130
const seedPersisted = async (rows: Array<T>): Promise<void> => {
@@ -340,9 +343,7 @@ function getConfig(): Promise<ElectronPersistedCollectionTestConfig> {
340343
return Promise.resolve(config)
341344
}
342345

343-
const conformanceMode = isElectronFullE2EEnabled()
344-
? `real electron ipc`
345-
: `in-process invoke`
346+
const conformanceMode = runFullE2E ? `real electron ipc` : `in-process invoke`
346347

347348
runPersistedCollectionConformanceSuite(
348349
`electron persisted collection conformance (${conformanceMode})`,

0 commit comments

Comments
 (0)