diff --git a/src/vs/platform/agentHost/test/node/copilotAgent.test.ts b/src/vs/platform/agentHost/test/node/copilotAgent.test.ts index a27d3ae71bc5b0..a954f50e384109 100644 --- a/src/vs/platform/agentHost/test/node/copilotAgent.test.ts +++ b/src/vs/platform/agentHost/test/node/copilotAgent.test.ts @@ -7999,8 +7999,8 @@ suite('CopilotAgent', () => { const provisional = (agent as unknown as { _provisionalSessions: Map })._provisionalSessions.get('temp-fallback'); assert.strictEqual(provisional?.workspaceless, true); } finally { - await fs.rm(userHome.fsPath, { recursive: true, force: true }); await disposeAgent(agent); + await fs.rm(userHome.fsPath, { recursive: true, force: true, maxRetries: 5 }); } }).timeout(30_000); @@ -8026,8 +8026,8 @@ suite('CopilotAgent', () => { assert.deepStrictEqual(uris.includes(scratchInstructions.toString()), false); } finally { - await fs.rm(userHome.fsPath, { recursive: true, force: true }); await disposeAgent(agent); + await fs.rm(userHome.fsPath, { recursive: true, force: true, maxRetries: 5 }); } }).timeout(30_000); @@ -8052,8 +8052,8 @@ suite('CopilotAgent', () => { await internals._resumeSession(sessionId, sessionBackedChat(sessionId)).catch(() => undefined); await fs.access(scratchDir.fsPath); } finally { - await fs.rm(userHome.fsPath, { recursive: true, force: true }); await disposeAgent(agent); + await fs.rm(userHome.fsPath, { recursive: true, force: true, maxRetries: 5 }); } }).timeout(30_000); @@ -8072,8 +8072,8 @@ suite('CopilotAgent', () => { await disposeProvisionedSession(agent, result.session); await assert.rejects(() => fs.access(scratchDir.fsPath)); } finally { - await fs.rm(userHome.fsPath, { recursive: true, force: true }); await disposeAgent(agent); + await fs.rm(userHome.fsPath, { recursive: true, force: true, maxRetries: 5 }); } }).timeout(30_000); @@ -8098,8 +8098,8 @@ suite('CopilotAgent', () => { await disposeProvisionedSession(agent, session); return { afterPeer, afterDefault: await scratchExists() }; } finally { - await fs.rm(userHome.fsPath, { recursive: true, force: true }); await disposeAgent(agent); + await fs.rm(userHome.fsPath, { recursive: true, force: true, maxRetries: 5 }); } }