Skip to content

Commit 8212ea4

Browse files
committed
Allow contract tests a cold plugin cache
The contract tests run the debug binary, whose first run compiles the bundled plugins into an empty wasmtime cache. CI used to warm that cache by running the CLI tests first; without that step the first contract test took 6 s on a CI runner and hit bun's 5 s default timeout. AI assistance: written with Claude Code; reviewed by the author. Claude-Session: https://claude.ai/code/session_01KDZ845xr2ngWfAabx9dg8z Agent-Session: dca03de1-4350-4b24-b376-cb54c86fcc2d Agent-Session: 82924cb5-dcfa-42e4-abb0-ef40393249f8 Agent-Session: 01a103d9-eefe-7d11-9db3-da97527a7db7
1 parent 2db1630 commit 8212ea4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎diffr-ts/src/contract.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { afterEach, describe, expect, test } from "bun:test";
1+
import { afterEach, describe, expect, setDefaultTimeout, test } from "bun:test";
22
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
33
import { tmpdir } from "node:os";
44
import { join } from "node:path";
@@ -10,6 +10,10 @@ import {
1010
} from "./index.js";
1111
import { diffrBinary, repositoryRoot } from "./test-binary.js";
1212

13+
// These tests run the debug binary. Its first run compiles the bundled plugins
14+
// into an empty wasmtime cache, which is slow on CI runners.
15+
setDefaultTimeout(30_000);
16+
1317
const dirs: string[] = [];
1418
function tempDir(prefix: string): string {
1519
const dir = mkdtempSync(join(tmpdir(), prefix));

0 commit comments

Comments
 (0)