Skip to content

Commit 9750f72

Browse files
committed
test: make session end race portable
1 parent c7e692b commit 9750f72

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/session-end.test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import assert from 'node:assert/strict';
33
import { spawn } from 'node:child_process';
44
import { mkdir, mkdtemp, readFile } from 'node:fs/promises';
55
import { tmpdir } from 'node:os';
6-
import { join } from 'node:path';
6+
import { basename, join } from 'node:path';
77
import test from 'node:test';
88
import { fileURLToPath } from 'node:url';
99

@@ -216,7 +216,7 @@ test('executeJob holds the cancellation lock across result artifact publication'
216216
const output = await executeJob({
217217
job: reservation, workspace: input.workspace, dataRoot: input.dataRoot, store: input.store, client: executorClient(), task: 'finish',
218218
syncDirectory: async (directory) => {
219-
if (!directory.endsWith('/results')) return;
219+
if (basename(directory) !== 'results') return;
220220
observed = await settle(input, async (current) => clientFor(current, { reads: [{ projection: { status: 'running' }, runtime: { stateRevision: 8 }, messages: [] }, { projection: { status: 'paused' }, runtime: { stateRevision: 8 }, messages: [] }] }));
221221
},
222222
});

0 commit comments

Comments
 (0)