test(server): avoid multiple installation in cluster

This commit is contained in:
mytharcher 2024-08-01 12:36:49 +00:00
parent 1702ac67e3
commit 3e19b27d73
2 changed files with 4 additions and 7 deletions

View File

@ -285,7 +285,7 @@ export async function createMockCluster({
...options,
skipSupervisor: true,
name: clusterName + '_' + appName,
// skipInstall: Boolean(i),
skipInstall: Boolean(i),
pubSubManager: {
channelPrefix: clusterName,
},

View File

@ -42,7 +42,7 @@ describe('workflow > cluster', () => {
const pro1 = (await p1.trigger(w1, {})) as Processor;
expect(pro1.execution.status).toBe(EXECUTION_STATUS.RESOLVED);
await sleep(500);
await sleep(550);
const p2 = app2.pm.get(Plugin) as Plugin;
const w2 = p2.enabledCache.get(w1.id);
@ -59,11 +59,8 @@ describe('workflow > cluster', () => {
const executions = await w1.getExecutions();
expect(executions.length).toBe(3);
await WorkflowRepo.update({
filterByTk: w1.id,
values: {
await w1.update({
enabled: false,
},
});
await sleep(550);