test(perf): trim qmd manager fixture setup overhead
This commit is contained in:
parent
94e480f64a
commit
d9a8d3853d
@ -131,11 +131,12 @@ describe("QmdMemoryManager", () => {
|
||||
logDebugMock.mockClear();
|
||||
logInfoMock.mockClear();
|
||||
tmpRoot = path.join(fixtureRoot, `case-${fixtureCount++}`);
|
||||
await fs.mkdir(tmpRoot);
|
||||
workspaceDir = path.join(tmpRoot, "workspace");
|
||||
await fs.mkdir(workspaceDir);
|
||||
stateDir = path.join(tmpRoot, "state");
|
||||
await fs.mkdir(stateDir);
|
||||
await Promise.all([
|
||||
fs.mkdir(workspaceDir, { recursive: true }),
|
||||
fs.mkdir(stateDir, { recursive: true }),
|
||||
]);
|
||||
process.env.OPENCLAW_STATE_DIR = stateDir;
|
||||
cfg = {
|
||||
agents: {
|
||||
@ -152,7 +153,7 @@ describe("QmdMemoryManager", () => {
|
||||
} as OpenClawConfig;
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
delete process.env.OPENCLAW_STATE_DIR;
|
||||
delete (globalThis as Record<string, unknown>).__openclawMcporterDaemonStart;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user