mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
ci(core): Reduce memory usage in tests (part-1) (no-changelog) (#7654)
This commit is contained in:
committed by
GitHub
parent
6a53c2a375
commit
0346b211a7
@@ -9,6 +9,8 @@ import { WorkflowHistoryManager } from '@/workflows/workflowHistory/workflowHist
|
||||
|
||||
import * as testDb from './shared/testDb';
|
||||
import { mockInstance } from './shared/utils';
|
||||
import { createWorkflow } from './shared/db/workflows';
|
||||
import { createManyWorkflowHistoryItems } from './shared/db/workflowHistory';
|
||||
|
||||
describe('Workflow History Manager', () => {
|
||||
const license = mockInstance(License);
|
||||
@@ -98,9 +100,9 @@ describe('Workflow History Manager', () => {
|
||||
});
|
||||
|
||||
const createWorkflowHistory = async (ageInDays = 2) => {
|
||||
const workflow = await testDb.createWorkflow();
|
||||
const workflow = await createWorkflow();
|
||||
const time = DateTime.now().minus({ days: ageInDays }).toJSDate();
|
||||
return testDb.createManyWorkflowHistoryItems(workflow.id, 10, time);
|
||||
return createManyWorkflowHistoryItems(workflow.id, 10, time);
|
||||
};
|
||||
|
||||
const pruneAndAssertCount = async (finalCount = 10, initialCount = 10) => {
|
||||
|
||||
Reference in New Issue
Block a user