Skip to content

Commit b0db38c

Browse files
edgeheroclaude
andcommitted
test(worker): pause-durability hard-fails without VALKEY_TEST_URL under PI_DISPATCH_REQUIRE_WORKER_TESTS
A VALKEY_TEST_URL-only skip let the durability tests silently no-op in CI if the env var were ever dropped -- "skipped = unverified". Match cron.integration: throw when required-but-unconfigured so the pause-survives-restart guarantee cannot pass green while unrun. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGgfho2J6YfRSQN1bSDhj6
1 parent be76eea commit b0db38c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

worker/test/pause-durability.test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import { parseConnection } from "../src/connection.mjs";
77
// throwaway queue name so a run never disturbs a live "pi-jobs" queue -- the durability SEMANTICS
88
// are what we exercise here; the real CLI's fixed "pi-jobs" name is covered by cli-control.test.mjs.
99
const url = process.env.VALKEY_TEST_URL;
10+
// A skipped assertion is an UNVERIFIED assertion. In CI, PI_DISPATCH_REQUIRE_WORKER_TESTS=1 turns a
11+
// missing VALKEY_TEST_URL into a hard failure so the durability guarantee can never silently no-op.
12+
if (!url && process.env.PI_DISPATCH_REQUIRE_WORKER_TESTS === "1") {
13+
throw new Error("pause-durability REQUIRES VALKEY_TEST_URL when PI_DISPATCH_REQUIRE_WORKER_TESTS=1");
14+
}
1015
const skip = url ? false : "needs VALKEY_TEST_URL";
1116

1217
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

0 commit comments

Comments
 (0)