Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

ci(electron): give unit tests a CI-sized timeout so slow release runners stop failing betas

velixioddba12b3b098
diff --git a/electron/src/shared/utils/longformPersistence.test.ts b/electron/src/shared/utils/longformPersistence.test.ts
index fc3f51033..3cb00d382 100644
--- a/electron/src/shared/utils/longformPersistence.test.ts
+++ b/electron/src/shared/utils/longformPersistence.test.ts
@@ -156,7 +156,7 @@ describe('split long-form persistence', () => {
});
it('recovers from localStorage quota failure using the committed durable payload', async () => {
- const largeScript = 'quota-safe manuscript '.repeat(300_000);
+ const largeScript = 'quota-safe manuscript '.repeat(20_000);
const legacy = legacyEnvelope(largeScript);
const local = createLocalStorage(legacy, true);
const durable = createDurableStore();
diff --git a/electron/vite.config.ts b/electron/vite.config.ts
index e33ee1696..6b3d84f84 100644
--- a/electron/vite.config.ts
+++ b/electron/vite.config.ts
@@ -31,6 +31,9 @@ export default defineConfig({
environment: 'jsdom',
globals: true,
setupFiles: ['./src/renderer/src/test/setup.ts'],
+ // Shared release runners (Intel macOS, Windows ARM) run the suite many times slower
+ // than a laptop; a real hang still fails, a busy runner no longer does.
+ testTimeout: process.env.CI ? 30_000 : 5_000,
include: [
'src/main/**/*.test.{ts,tsx}',
'src/renderer/**/*.test.{ts,tsx}',
diff --git a/electron/vite.shared.config.ts b/electron/vite.shared.config.ts
index 5275a2460..a283fd8dd 100644
--- a/electron/vite.shared.config.ts
+++ b/electron/vite.shared.config.ts
@@ -43,6 +43,9 @@ export default defineConfig({
environment: 'jsdom',
globals: true,
setupFiles: ['./src/shared/test/setup.js'],
+ // Shared release runners (Intel macOS, Windows ARM) run the suite many times slower
+ // than a laptop; a real hang still fails, a busy runner no longer does.
+ testTimeout: process.env.CI ? 30_000 : 5_000,
include: ['src/shared/**/*.test.{js,jsx,ts,tsx}'],
css: false,
},
diff --git a/tests/test_electron_test_timeouts.py b/tests/test_electron_test_timeouts.py
new file mode 100644
index 000000000..b78de017b
--- /dev/null
+++ b/tests/test_electron_test_timeouts.py
@@ -0,0 +1,15 @@
+"""Release packaging reruns the Electron unit suites on slow shared runners.
+
+v0.5.7-beta.2 and -beta.3 failed when a test that takes ~30 ms on a laptop hit
+Vitest's default 5 s timeout there. Both suites must allow a CI-sized timeout.
+"""
+
+from pathlib import Path
+
+ELECTRON = Path(__file__).resolve().parents[1] / "electron"
+
+
+def test_both_vitest_suites_allow_slow_ci_runners():
+ for config in ("vite.config.ts", "vite.shared.config.ts"):
+ text = (ELECTRON / config).read_text()
+ assert "testTimeout: process.env.CI ? 30_000 : 5_000" in text, config