Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(im): allow Windows file helper cold startup

JiangJiahao2642e34efb2d
diff --git a/packages/lizi-im/src/feishu/__tests__/outboundFile.test.ts b/packages/lizi-im/src/feishu/__tests__/outboundFile.test.ts
index 9becee9b22..dbb9c873ba 100644
--- a/packages/lizi-im/src/feishu/__tests__/outboundFile.test.ts
+++ b/packages/lizi-im/src/feishu/__tests__/outboundFile.test.ts
@@ -102,6 +102,9 @@ describe('Feishu parent-chat file reuse', () => {
);
});
+ // The first Windows upload cold-starts PowerShell/Add-Type. Its production
+ // helper has a 15s deadline; allow it to finish before asserting the attested
+ // path instead of timing out at Vitest's default 5s (CI run 39577662696).
it('uploads a regular file once and reuses its file_key for the parent chat', async () => {
const absPath = await fileFixture('报告.txt', 'trusted report');
@@ -133,7 +136,7 @@ describe('Feishu parent-chat file reuse', () => {
expect(mocks.createFile).toHaveBeenCalledOnce();
expect(mocks.createImage).not.toHaveBeenCalled();
expect(mocks.createMessage).toHaveBeenCalledTimes(2);
- });
+ }, process.platform === 'win32' ? 20_000 : undefined);
// Windows starts a fresh PowerShell process and compiles the native helper
// for each containment proof. Keep this security regression independent of