mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
test(integration): compare the ACP parity workspace home to its pre-run listing (#16266)
The guard hardcoded the two names the shared harness seeds into the workspace
home, so the next artifact that harness seeds would red every parity scenario
with a message about a runtime leak that is not there. Snapshot the listing
before the agent starts and compare against that instead, which states the
invariant without copying the fixture contents of another module.
Carries forward 1923e184 from #16254, which was pushed after that PR merged.
This commit is contained in:
1 parent
4e9c2ad739
commit
5f0474abc4
1 file changed
+6
-7
@@ -281,6 +281,8 @@ const allowOnce = () => ({
|
||||
});
|
||||
const dir = rig.testDir!;
|
||||
scenario.prepare?.(rig);
|
||||
// Snapshot the fixture's home writes before the child can touch it.
|
||||
const homeBefore = readdirSync(join(dir, '.qwen-home')).sort();
|
||||
let streamingIndex = 0;
|
||||
server = await startFakeOpenAIServer(
|
||||
({ body }) =>
|
||||
@@ -514,13 +516,10 @@ const allowOnce = () => ({
|
||||
}
|
||||
}
|
||||
// The scratch runtime keeps the session runtime's `tmp/<hash>` and
|
||||
// `usage/` out of the workspace; pin what TestRig wrote there instead
|
||||
// of relying on the snapshot diff, which only trips on the losing side
|
||||
// of a race.
|
||||
expect(readdirSync(join(dir, '.qwen-home')).sort()).toEqual([
|
||||
'settings.json',
|
||||
'trustedFolders.json',
|
||||
]);
|
||||
// `usage/` out of the workspace. Comparing against the pre-run listing
|
||||
// avoids copying TestRig's seeded names, and a leak fails here directly
|
||||
// rather than only when the request equality loses a race.
|
||||
expect(readdirSync(join(dir, '.qwen-home')).sort()).toEqual(homeBefore);
|
||||
return {
|
||||
requests: modelRequests(server, dir),
|
||||
dateReminders: streamingMessages(server).filter((messages) =>
|
||||
|
||||
Reference in new issue
Block a user