From 23cb12e553e9b7aa481e5c7d7d32dd06670c3b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 11 Jun 2024 03:34:36 +0200 Subject: [PATCH] ci: Remove unused WaitTracker mocking (no-changelog) We changed WaitTracker to not start the timer in the constructor in #9600. So we don't need to mock it anymore. --- packages/cli/test/integration/commands/ldap/reset.test.ts | 4 ---- .../cli/test/integration/environments/SourceControl.test.ts | 5 ----- packages/cli/test/integration/executions.controller.test.ts | 5 ----- ...kflows.controller-with-active-workflow-manager.ee.test.ts | 5 ----- 4 files changed, 19 deletions(-) diff --git a/packages/cli/test/integration/commands/ldap/reset.test.ts b/packages/cli/test/integration/commands/ldap/reset.test.ts index 6bbd15eddeaec..9a0ebecd516c2 100644 --- a/packages/cli/test/integration/commands/ldap/reset.test.ts +++ b/packages/cli/test/integration/commands/ldap/reset.test.ts @@ -17,7 +17,6 @@ import { Push } from '@/push'; import { SharedWorkflowRepository } from '@/databases/repositories/sharedWorkflow.repository'; import { SharedCredentialsRepository } from '@/databases/repositories/sharedCredentials.repository'; import { createTeamProject, findProject, getPersonalProject } from '../../shared/db/projects'; -import { WaitTracker } from '@/WaitTracker'; import { getLdapSynchronizations, saveLdapSynchronization } from '@/Ldap/helpers'; import { createLdapConfig } from '../../shared/ldap'; import { LdapService } from '@/Ldap/ldap.service'; @@ -40,9 +39,6 @@ beforeAll(async () => { mockInstance(Push); mockInstance(InternalHooks); mockInstance(LoadNodesAndCredentials); - // This needs to be mocked, otherwise the time setInterval would prevent jest - // from exiting properly. - mockInstance(WaitTracker); await testDb.init(); await oclifConfig.load(); }); diff --git a/packages/cli/test/integration/environments/SourceControl.test.ts b/packages/cli/test/integration/environments/SourceControl.test.ts index 84eec3c0dae57..c64981c096612 100644 --- a/packages/cli/test/integration/environments/SourceControl.test.ts +++ b/packages/cli/test/integration/environments/SourceControl.test.ts @@ -5,19 +5,14 @@ import config from '@/config'; import { SourceControlPreferencesService } from '@/environments/sourceControl/sourceControlPreferences.service.ee'; import { SourceControlService } from '@/environments/sourceControl/sourceControl.service.ee'; import type { SourceControlledFile } from '@/environments/sourceControl/types/sourceControlledFile'; -import { WaitTracker } from '@/WaitTracker'; import * as utils from '../shared/utils/'; import { createUser } from '../shared/db/users'; -import { mockInstance } from '../../shared/mocking'; import type { SuperAgentTest } from '../shared/types'; let authOwnerAgent: SuperAgentTest; let owner: User; -// This is necessary for the tests to shutdown cleanly. -mockInstance(WaitTracker); - const testServer = utils.setupTestServer({ endpointGroups: ['sourceControl', 'license', 'auth'], enabledFeatures: ['feat:sourceControl', 'feat:sharing'], diff --git a/packages/cli/test/integration/executions.controller.test.ts b/packages/cli/test/integration/executions.controller.test.ts index 23c4cd836eb09..e73cb98b4753a 100644 --- a/packages/cli/test/integration/executions.controller.test.ts +++ b/packages/cli/test/integration/executions.controller.test.ts @@ -5,8 +5,6 @@ import { createMember, createOwner } from './shared/db/users'; import { createWorkflow, shareWorkflowWithUsers } from './shared/db/workflows'; import * as testDb from './shared/testDb'; import { setupTestServer } from './shared/utils'; -import { mockInstance } from '../shared/mocking'; -import { WaitTracker } from '@/WaitTracker'; import { createTeamProject, linkUserToProject } from './shared/db/projects'; const testServer = setupTestServer({ endpointGroups: ['executions'] }); @@ -14,9 +12,6 @@ const testServer = setupTestServer({ endpointGroups: ['executions'] }); let owner: User; let member: User; -// This is necessary for the tests to shutdown cleanly. -mockInstance(WaitTracker); - const saveExecution = async ({ belongingTo }: { belongingTo: User }) => { const workflow = await createWorkflow({}, belongingTo); return await createSuccessfulExecution(workflow); diff --git a/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts b/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts index f4387f30ad37b..42f3a49e06197 100644 --- a/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts +++ b/packages/cli/test/integration/workflows/workflows.controller-with-active-workflow-manager.ee.test.ts @@ -5,8 +5,6 @@ import * as testDb from '../shared/testDb'; import { createUser } from '../shared/db/users'; import { createWorkflowWithTrigger } from '../shared/db/workflows'; import { createTeamProject } from '../shared/db/projects'; -import { mockInstance } from '../../shared/mocking'; -import { WaitTracker } from '@/WaitTracker'; let member: User; let anotherMember: User; @@ -16,9 +14,6 @@ const testServer = utils.setupTestServer({ enabledFeatures: ['feat:sharing', 'feat:advancedPermissions'], }); -// This is necessary for the tests to shutdown cleanly. -mockInstance(WaitTracker); - beforeAll(async () => { member = await createUser({ role: 'global:member' }); anotherMember = await createUser({ role: 'global:member' });