Tests pass under heavy host load (closes #233) #234

Merged
clawbot merged 1 commits from issue-233-test-load-timeouts into next 2026-11-10 22:55:29 +01:00
Collaborator

Fixes #233: the suite timed out on this host under its usual load.

  • vitest.config.ts: maxWorkers: 4. It is the smallest count that kept the suite well inside the Dockerfile's timeout 90 under this host's load; with 2 the suite came close to that limit. minWorkers: 1 is needed too: vitest 2.1.9 throws RangeError: options.minThreads and options.maxThreads must not conflict when maxWorkers is below its default minWorkers, which is the core count minus one.
  • test/cli/bin.test.ts: the slow part is compiling the sources on their first import. Running them again after vi.resetModules() is cheap. The file now imports src/cli-commands.ts and src/index.ts and awaits init() at the top, outside any test's timeout.
  • With the limit in place, the thumbnail tests and the metadata-backup "is incremental" test still ran past half their timeout. Each logs in once or twice, and each login runs Argon2id at 64 MiB. The fake accounts in test/ente-server.ts and test/thumbnails/thumbnails.test.ts now use libsodium's lowest cost (1 pass, 8 KiB). No test using them checks the KDF.

Judgement call: test/auth/login.test.ts, test/client/usage.test.ts, test/auth/unwrap.test.ts and test/crypto/kdf.test.ts keep 64 MiB. They stayed under half their timeout, and the first two are about login.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/quak/issues/233: the suite timed out on this host under its usual load. - `vitest.config.ts`: `maxWorkers: 4`. It is the smallest count that kept the suite well inside the Dockerfile's `timeout 90` under this host's load; with 2 the suite came close to that limit. `minWorkers: 1` is needed too: vitest 2.1.9 throws `RangeError: options.minThreads and options.maxThreads must not conflict` when `maxWorkers` is below its default `minWorkers`, which is the core count minus one. - `test/cli/bin.test.ts`: the slow part is compiling the sources on their first import. Running them again after `vi.resetModules()` is cheap. The file now imports `src/cli-commands.ts` and `src/index.ts` and awaits `init()` at the top, outside any test's timeout. - With the limit in place, the thumbnail tests and the metadata-backup "is incremental" test still ran past half their timeout. Each logs in once or twice, and each login runs Argon2id at 64 MiB. The fake accounts in `test/ente-server.ts` and `test/thumbnails/thumbnails.test.ts` now use libsodium's lowest cost (1 pass, 8 KiB). No test using them checks the KDF. Judgement call: `test/auth/login.test.ts`, `test/client/usage.test.ts`, `test/auth/unwrap.test.ts` and `test/crypto/kdf.test.ts` keep 64 MiB. They stayed under half their timeout, and the first two are about login. Model: opus-5-5
clawbot added the needs-review label 2026-11-10 22:04:51 +01:00
clawbot self-assigned this 2026-11-10 22:04:51 +01:00
clawbot added 1 commit 2026-11-10 22:04:51 +01:00
Tests pass under heavy host load (closes #233)
check / check (push) Successful in 9m58s
d3965373ab
vitest runs at most four workers instead of one per core; minWorkers is
set to 1 because vitest 2 rejects a maxWorkers below its default
minWorkers. test/cli/bin.test.ts compiles the sources bin/quak.ts imports
and starts libsodium once, before its tests run. The fake accounts in
test/ente-server.ts and test/thumbnails/thumbnails.test.ts use
libsodium's lowest Argon2id cost, since each login runs the KDF again.

Model: opus-5-5
Author
Collaborator

PASS: meets the definition of done in #233.

Model: opus-5-5

**PASS**: meets the definition of done in https://git.eeqj.de/sneak/quak/issues/233. Model: opus-5-5
clawbot merged commit 1f409cbbf2 into next 2026-11-10 22:55:29 +01:00
clawbot deleted branch issue-233-test-load-timeouts 2026-11-10 22:55:29 +01:00
Sign in to join this conversation.