ci speed: desktop boot check runs its cases in parallel (one browser, killed at the end; a page per case; condition waits instead of fixed sleeps: element, text or a quiet window of host calls and DOM); shots capture / render close the browser with a 3 s cap, then kill it; console engine waits injectable for tests (WAITS / engineWaits: poll rounds, a missing step ends once its loaded page stays quiet, team switch settle, field-miss grace), fillPage looks up each data type's dialog once per round and skips dialog sections when no dialog is open; browser tests run 4 at a time per file (testScope().concurrent with a scope per test, --max-concurrency in ci), 20 ms rounds; capture-web counts boots per test and runs its browser tests concurrently; console-session / -persist Chrome tests concurrent; recorded test timings smoothed (mergeTimings) so one loaded run does not skew the shard split
This commit is contained in:
parent
f2d7062bcb
commit
9ba8471002
16 changed files with 390 additions and 178 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, expect, test } from 'bun:test';
|
||||
import { balance, depsOf, GLOBAL, HEAVY, junitTimes, listTests, relatedTests, rustNeeded, shardCount } from '../tools/ci-plan';
|
||||
import { balance, depsOf, GLOBAL, HEAVY, junitTimes, listTests, mergeTimings, relatedTests, rustNeeded, shardCount } from '../tools/ci-plan';
|
||||
|
||||
describe('tools/ci-plan: test shards', () => {
|
||||
test('shard count: cores - 1, between 1 and 8, env override', () => {
|
||||
|
|
@ -27,6 +27,11 @@ describe('tools/ci-plan: test shards', () => {
|
|||
<testsuite name="tests/b.test.ts" file="tests/b.test.ts" time="0.25"></testsuite></testsuites>`;
|
||||
expect(junitTimes(xml)).toEqual({ 'tests/a.test.ts': 1.5, 'tests/b.test.ts': 0.25 });
|
||||
});
|
||||
test('recorded timings: a new file takes its time; a known one moves halfway, never up past the new time', () => {
|
||||
const t = mergeTimings({ 'a.test.ts': 10, 'b.test.ts': 40, 'keep.test.ts': 3 }, { 'a.test.ts': 30, 'b.test.ts': 20, 'new.test.ts': 5 });
|
||||
expect(t).toEqual({ 'a.test.ts': 20, 'b.test.ts': 20, 'keep.test.ts': 3, 'new.test.ts': 5 });
|
||||
});
|
||||
|
||||
test('every heavy suite exists and every test file is found', () => {
|
||||
const all = listTests();
|
||||
for (const h of HEAVY) expect(all).toContain(h);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue