ci: shard windows tests and fix event listener leaks (#18670)

This commit is contained in:
N. Taylor Mullen
2026-02-10 10:46:42 -08:00
committed by GitHub
parent 262138cad5
commit b37e67451a
11 changed files with 77 additions and 25 deletions
+9 -1
View File
@@ -10,11 +10,19 @@ if (process.env.NO_COLOR !== undefined) {
}
import { setSimulate429 } from './src/utils/testUtils.js';
import { vi } from 'vitest';
import { vi, afterEach } from 'vitest';
import { coreEvents } from './src/utils/events.js';
// Increase max listeners to avoid warnings in large test suites
coreEvents.setMaxListeners(100);
// Disable 429 simulation globally for all tests
setSimulate429(false);
afterEach(() => {
vi.unstubAllEnvs();
});
// Default mocks for Storage and ProjectRegistry to prevent disk access in most tests.
// These can be overridden in specific tests using vi.unmock().
+5 -4
View File
@@ -9,8 +9,9 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
reporters: ['default', 'junit'],
timeout: 30000,
hookTimeout: 30000,
testTimeout: 60000,
hookTimeout: 60000,
pool: 'forks',
silent: true,
setupFiles: ['./test-setup.ts'],
outputFile: {
@@ -32,8 +33,8 @@ export default defineConfig({
},
poolOptions: {
threads: {
minThreads: 8,
maxThreads: 16,
minThreads: 1,
maxThreads: 4,
},
},
},