Skip to content

Commit 7b00579

Browse files
committed
fix(test): supply complete replay reload policy
1 parent 85d27fb commit 7b00579

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

tests/boundary/mcp/mainReload.test.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
type RuntimeDependencies = NonNullable<Parameters<typeof run>[0]>;
2020

2121
const directories: string[] = [];
22-
const RELOAD_ASSERTION_TIMEOUT_MS = 5_000;
2322

2423
afterEach(async () => {
2524
await Promise.all(
@@ -65,9 +64,7 @@ describe("runtime permission reload", () => {
6564

6665
releaseValidRead.resolve();
6766
await expect
68-
.poll(() => canRead(runtime.authority, fixture.newRoot), {
69-
timeout: RELOAD_ASSERTION_TIMEOUT_MS,
70-
})
67+
.poll(() => canRead(runtime.authority, fixture.newRoot))
7168
.toBe(true);
7269

7370
expect(runtime.options.processPolicy?.().status).toBe("enabled");
@@ -112,9 +109,7 @@ describe("runtime permission reload", () => {
112109
releaseFirstRead.resolve();
113110
await secondReadStarted.promise;
114111
await expect
115-
.poll(() => canRead(runtime.authority, fixture.latestRoot), {
116-
timeout: RELOAD_ASSERTION_TIMEOUT_MS,
117-
})
112+
.poll(() => canRead(runtime.authority, fixture.latestRoot))
118113
.toBe(true);
119114

120115
expect(runtime.options.processPolicy?.().status).toBe("disabled");
@@ -139,13 +134,9 @@ describe("runtime permission reload", () => {
139134
configure(fixture.env, fixture.newRoot, true);
140135
runtime.reload();
141136
runtime.reload();
137+
await expect.poll(() => reads).toBe(2);
142138
await expect
143-
.poll(() => reads, { timeout: RELOAD_ASSERTION_TIMEOUT_MS })
144-
.toBe(2);
145-
await expect
146-
.poll(() => canRead(runtime.authority, fixture.newRoot), {
147-
timeout: RELOAD_ASSERTION_TIMEOUT_MS,
148-
})
139+
.poll(() => canRead(runtime.authority, fixture.newRoot))
149140
.toBe(true);
150141

151142
expect(reads).toBe(2);
@@ -230,6 +221,11 @@ const configure = (
230221
env.REA_MANAGED_RUNTIME_EXECUTABLE_PATH = process.execPath;
231222
env.REA_JAVASCRIPT_REPLAY_ENABLED = String(enabled);
232223
env.REA_JAVASCRIPT_REPLAY_ROOTS_JSON = JSON.stringify([root]);
224+
env.REA_JAVASCRIPT_REPLAY_NODE_PATH = process.execPath;
225+
env.REA_JAVASCRIPT_REPLAY_BWRAP_PATH = process.execPath;
226+
env.REA_JAVASCRIPT_REPLAY_SYSTEMD_RUN_PATH = process.execPath;
227+
env.REA_JAVASCRIPT_REPLAY_SYSTEMCTL_PATH = process.execPath;
228+
env.REA_JAVASCRIPT_REPLAY_SHELL_PATH = process.execPath;
233229
env.REA_BROWSER_OBSERVE_ENABLED = String(enabled);
234230
env.REA_BROWSER_CDP_ENDPOINTS_JSON = JSON.stringify([
235231
"http://127.0.0.1:9222",

0 commit comments

Comments
 (0)