From c65330ddb72ee3d41a630c77576fb64a1c0f54e7 Mon Sep 17 00:00:00 2001 From: Hugo Arregui Date: Tue, 23 Apr 2024 14:55:43 -0300 Subject: [PATCH] remove leak detector --- content/package.json | 1 - .../test/integration/E2ETestEnvironment.ts | 9 +++-- .../controller/active-entities.spec.ts | 3 -- .../active-entity-by-content-hash.spec.ts | 3 -- .../controller/active-pointers.spec.ts | 3 -- .../test/integration/controller/audit.spec.ts | 3 -- .../controller/available-content.spec.ts | 3 -- .../integration/controller/content.spec.ts | 3 -- .../controller/deployment-fields.spec.ts | 3 -- .../controller/deployment-pagination.spec.ts | 3 -- .../integration/controller/entities.spec.ts | 3 -- .../controller/entity-metadata.spec.ts | 3 -- .../integration/controller/status.spec.ts | 3 -- .../deployer/concurrent-deployments.spec.ts | 3 -- .../deployment-entity-overlap.spec.ts | 3 -- .../ports/deployer/deployment-filters.spec.ts | 3 -- .../metadata-schema-validations.spec.ts | 3 -- .../ports/deployer/old-entity-synced.spec.ts | 3 -- .../ports/deployer/order-check.spec.ts | 3 -- .../deployer/same-timestamp-check.spec.ts | 3 -- .../ports/failedDeployments.spec.ts | 3 -- .../ports/processedSnapshotStorage.spec.ts | 3 -- .../integration/ports/snapshotStorage.spec.ts | 3 -- .../ports/system-properties.spec.ts | 3 -- .../syncronization/error-handling.spec.ts | 5 --- .../integration/upload-and-download.spec.ts | 3 -- yarn.lock | 39 ------------------- 27 files changed, 5 insertions(+), 118 deletions(-) diff --git a/content/package.json b/content/package.json index 09ea62e49..14f0f3705 100644 --- a/content/package.json +++ b/content/package.json @@ -77,7 +77,6 @@ "jest": "27.4.7", "jest-extra-utils": "^0.1.0", "jest-junit": "^13.0.0", - "jest-leak-detector": "^29.3.1", "lint-staged": "13.0.3", "nyc": "^15.1.0", "prettier": "2.7.1", diff --git a/content/test/integration/E2ETestEnvironment.ts b/content/test/integration/E2ETestEnvironment.ts index a6305a80b..b61098e47 100644 --- a/content/test/integration/E2ETestEnvironment.ts +++ b/content/test/integration/E2ETestEnvironment.ts @@ -3,7 +3,6 @@ import { ILoggerComponent } from '@well-known-components/interfaces' import { createLogComponent } from '@well-known-components/logger' import { createTestMetricsComponent } from '@well-known-components/metrics' import { random } from 'faker' -import LeakDetector from 'jest-leak-detector' import ms from 'ms' import { DEFAULT_DATABASE_CONFIG, Environment, EnvironmentBuilder, EnvironmentConfig } from '../../src/Environment' import { stopAllComponents } from '../../src/logic/components-lifecycle' @@ -149,7 +148,11 @@ export class ServerBuilder { private readonly builder: EnvironmentBuilder private readonly storageBaseFolder: string - constructor(private readonly testEnvCalls: TestEnvCalls, env: Environment, public dao: DAOComponent) { + constructor( + private readonly testEnvCalls: TestEnvCalls, + env: Environment, + public dao: DAOComponent + ) { this.builder = new EnvironmentBuilder(env) this.storageBaseFolder = env.getConfig(EnvironmentConfig.STORAGE_ROOT_FOLDER) ?? 'storage' } @@ -218,10 +221,8 @@ export function setupTestEnvironment(overrideConfigs?: Record) { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(testEnv) await testEnv.stop() testEnv = null as any - expect(await detector.isLeaking()).toBe(false) }) return () => testEnv diff --git a/content/test/integration/controller/active-entities.spec.ts b/content/test/integration/controller/active-entities.spec.ts index dee3e9167..6976060f0 100644 --- a/content/test/integration/controller/active-entities.spec.ts +++ b/content/test/integration/controller/active-entities.spec.ts @@ -5,7 +5,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData } from '../E2ETestUtils' import { getIntegrationResourcePathFor } from '../resources/get-resource-path' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from '../simpleTestEnvironment' describe('Integration - Get Active Entities', () => { @@ -20,10 +19,8 @@ describe('Integration - Get Active Entities', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('when asking without params, it returns client error', async () => { diff --git a/content/test/integration/controller/active-entity-by-content-hash.spec.ts b/content/test/integration/controller/active-entity-by-content-hash.spec.ts index 1628d6013..b4a8cb4c7 100644 --- a/content/test/integration/controller/active-entity-by-content-hash.spec.ts +++ b/content/test/integration/controller/active-entity-by-content-hash.spec.ts @@ -3,7 +3,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData } from '../E2ETestUtils' import { createDefaultServer, resetServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Get Active Entities By Content Hash', () => { let server: TestProgram @@ -17,10 +16,8 @@ describe('Integration - Get Active Entities By Content Hash', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it("When the deployment doesn't exist returns 404", async () => { diff --git a/content/test/integration/controller/active-pointers.spec.ts b/content/test/integration/controller/active-pointers.spec.ts index d52d153cd..8af0574a5 100644 --- a/content/test/integration/controller/active-pointers.spec.ts +++ b/content/test/integration/controller/active-pointers.spec.ts @@ -6,7 +6,6 @@ import { getIntegrationResourcePathFor } from '../resources/get-resource-path' import { TestProgram } from '../TestProgram' import FormData = require('form-data') import { resetServer, createDefaultServer } from '../simpleTestEnvironment' -import LeakDetector from 'jest-leak-detector' interface ActivePointersRow { entity_id: string @@ -37,10 +36,8 @@ describe('Integration - Create entities', () => { afterAll(async () => { jest.restoreAllMocks() stopAllComponents({ fs }) - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('when creating a profile, pointer should be stored in active-pointers table', async () => { diff --git a/content/test/integration/controller/audit.spec.ts b/content/test/integration/controller/audit.spec.ts index 3ebd20267..79889990e 100644 --- a/content/test/integration/controller/audit.spec.ts +++ b/content/test/integration/controller/audit.spec.ts @@ -4,7 +4,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData, deployEntitiesCombo } from '../E2ETestUtils' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Audit', () => { let server: TestProgram @@ -16,10 +15,8 @@ describe('Integration - Audit', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('returns 400 when no cid is provided', async () => { diff --git a/content/test/integration/controller/available-content.spec.ts b/content/test/integration/controller/available-content.spec.ts index adbd2dad6..c580c7d47 100644 --- a/content/test/integration/controller/available-content.spec.ts +++ b/content/test/integration/controller/available-content.spec.ts @@ -2,7 +2,6 @@ import fetch from 'node-fetch' import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidator' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Available Content', () => { let server: TestProgram @@ -14,10 +13,8 @@ describe('Integration - Available Content', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('returns 400 when no cid is provided', async () => { diff --git a/content/test/integration/controller/content.spec.ts b/content/test/integration/controller/content.spec.ts index 94d5800d9..cd804730f 100644 --- a/content/test/integration/controller/content.spec.ts +++ b/content/test/integration/controller/content.spec.ts @@ -2,7 +2,6 @@ import fetch from 'node-fetch' import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidator' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Get Content', () => { let server: TestProgram @@ -14,10 +13,8 @@ describe('Integration - Get Content', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('returns 404 when the content file does not exist', async () => { diff --git a/content/test/integration/controller/deployment-fields.spec.ts b/content/test/integration/controller/deployment-fields.spec.ts index 2dcded4f9..1b8d8af84 100644 --- a/content/test/integration/controller/deployment-fields.spec.ts +++ b/content/test/integration/controller/deployment-fields.spec.ts @@ -5,7 +5,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData } from '../E2ETestUtils' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Deployment Fields', () => { const fetcher = createFetchComponent() @@ -25,10 +24,8 @@ describe('Integration - Deployment Fields', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('When deployments fields filter is used, then the result is the expected', async () => { diff --git a/content/test/integration/controller/deployment-pagination.spec.ts b/content/test/integration/controller/deployment-pagination.spec.ts index 2b9ade8d1..3fde17f68 100644 --- a/content/test/integration/controller/deployment-pagination.spec.ts +++ b/content/test/integration/controller/deployment-pagination.spec.ts @@ -8,7 +8,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData, EntityCombo } from '../E2ETestUtils' import { resetServer, createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Deployment Pagination', () => { const fetcher = createFetchComponent() @@ -43,10 +42,8 @@ describe('Integration - Deployment Pagination', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('given local timestamp and asc when getting two elements the next link page is correct', async () => { diff --git a/content/test/integration/controller/entities.spec.ts b/content/test/integration/controller/entities.spec.ts index 9bec937ca..1e87471ee 100644 --- a/content/test/integration/controller/entities.spec.ts +++ b/content/test/integration/controller/entities.spec.ts @@ -2,7 +2,6 @@ import fetch from 'node-fetch' import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidator' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Entities', () => { let server: TestProgram @@ -14,10 +13,8 @@ describe('Integration - Entities', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('returns 500 when there is an exception while deploying the entity', async () => { diff --git a/content/test/integration/controller/entity-metadata.spec.ts b/content/test/integration/controller/entity-metadata.spec.ts index 415ed822e..1ffb065b2 100644 --- a/content/test/integration/controller/entity-metadata.spec.ts +++ b/content/test/integration/controller/entity-metadata.spec.ts @@ -3,7 +3,6 @@ import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidat import { buildDeployData } from '../E2ETestUtils' import { createDefaultServer, resetServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Get wearable image and thumbnail', () => { let server: TestProgram @@ -17,10 +16,8 @@ describe('Integration - Get wearable image and thumbnail', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('when entity does not exist, it should return 404', async () => { diff --git a/content/test/integration/controller/status.spec.ts b/content/test/integration/controller/status.spec.ts index c07e9306b..cfa79ceb4 100644 --- a/content/test/integration/controller/status.spec.ts +++ b/content/test/integration/controller/status.spec.ts @@ -2,7 +2,6 @@ import fetch from 'node-fetch' import { makeNoopValidator } from '../../helpers/service/validations/NoOpValidator' import { createDefaultServer } from '../simpleTestEnvironment' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' describe('Integration - Status', () => { let server: TestProgram @@ -14,10 +13,8 @@ describe('Integration - Status', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('returns 200 when the status is ok', async () => { diff --git a/content/test/integration/ports/deployer/concurrent-deployments.spec.ts b/content/test/integration/ports/deployer/concurrent-deployments.spec.ts index 251bf9a35..c7f1f6f9f 100644 --- a/content/test/integration/ports/deployer/concurrent-deployments.spec.ts +++ b/content/test/integration/ports/deployer/concurrent-deployments.spec.ts @@ -5,7 +5,6 @@ import { AppComponents } from '../../../../src/types' import { makeNoopServerValidator, makeNoopValidator } from '../../../helpers/service/validations/NoOpValidator' import { buildDeployData, deployEntitiesCombo, EntityCombo } from '../../E2ETestUtils' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../../simpleTestEnvironment' const P1 = 'x1,y1' @@ -26,10 +25,8 @@ describe('Integration - Concurrent deployments', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('When deployments are executed concurrently, then only one remains active', async () => { diff --git a/content/test/integration/ports/deployer/deployment-entity-overlap.spec.ts b/content/test/integration/ports/deployer/deployment-entity-overlap.spec.ts index cd4bbd22e..df6b5d314 100644 --- a/content/test/integration/ports/deployer/deployment-entity-overlap.spec.ts +++ b/content/test/integration/ports/deployer/deployment-entity-overlap.spec.ts @@ -11,7 +11,6 @@ import { AppComponents } from '../../../../src/types' import { makeNoopServerValidator, makeNoopValidator } from '../../../helpers/service/validations/NoOpValidator' import { buildDeployData, buildDeployDataAfterEntity, createIdentity, EntityCombo, Identity } from '../../E2ETestUtils' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../../simpleTestEnvironment' const P1 = '0,0' @@ -31,10 +30,8 @@ describe('Integration - Deployment with Entity Overlaps', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) let identity: Identity diff --git a/content/test/integration/ports/deployer/deployment-filters.spec.ts b/content/test/integration/ports/deployer/deployment-filters.spec.ts index 166a1ca32..fbc242633 100644 --- a/content/test/integration/ports/deployer/deployment-filters.spec.ts +++ b/content/test/integration/ports/deployer/deployment-filters.spec.ts @@ -12,7 +12,6 @@ import { AppComponents } from '../../../../src/types' import { makeNoopServerValidator, makeNoopValidator } from '../../../helpers/service/validations/NoOpValidator' import { buildDeployData, buildDeployDataAfterEntity, EntityCombo } from '../../E2ETestUtils' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from '../../simpleTestEnvironment' const P1 = 'x1,y1' @@ -36,10 +35,8 @@ describe('Integration - Deployment Filters', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) let E1: EntityCombo, E2: EntityCombo, E3: EntityCombo diff --git a/content/test/integration/ports/deployer/metadata-schema-validations.spec.ts b/content/test/integration/ports/deployer/metadata-schema-validations.spec.ts index 9364e24b9..70c73aeb7 100644 --- a/content/test/integration/ports/deployer/metadata-schema-validations.spec.ts +++ b/content/test/integration/ports/deployer/metadata-schema-validations.spec.ts @@ -4,7 +4,6 @@ import { AppComponents, EntityVersion } from '../../../../src/types' import { makeNoopServerValidator } from '../../../helpers/service/validations/NoOpValidator' import { EntityCombo, buildDeployData, createIdentity } from '../../E2ETestUtils' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from '../../simpleTestEnvironment' const P1 = '0,0' @@ -25,10 +24,8 @@ describe('Integration - Deployment with metadata validation', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('When scene metadata is missing, deployment result should include the proper error', async () => { diff --git a/content/test/integration/ports/deployer/old-entity-synced.spec.ts b/content/test/integration/ports/deployer/old-entity-synced.spec.ts index c0e3940d9..f90a27a77 100644 --- a/content/test/integration/ports/deployer/old-entity-synced.spec.ts +++ b/content/test/integration/ports/deployer/old-entity-synced.spec.ts @@ -5,7 +5,6 @@ import { makeNoopServerValidator } from '../../../helpers/service/validations/No import { EntityCombo } from '../../E2ETestUtils' import { getIntegrationResourcePathFor } from '../../resources/get-resource-path' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../../simpleTestEnvironment' describe('Integration - Deployment synced old entity', () => { @@ -18,10 +17,8 @@ describe('Integration - Deployment synced old entity', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('When deploying an entity with cid v0 hashes of entities before ADR 45, it should succeed', async () => { diff --git a/content/test/integration/ports/deployer/order-check.spec.ts b/content/test/integration/ports/deployer/order-check.spec.ts index dc34c21c1..42de12aa0 100644 --- a/content/test/integration/ports/deployer/order-check.spec.ts +++ b/content/test/integration/ports/deployer/order-check.spec.ts @@ -4,7 +4,6 @@ import { makeNoopServerValidator, makeNoopValidator } from '../../../helpers/ser import { buildDeployData, buildDeployDataAfterEntity, deployEntitiesCombo, EntityCombo } from '../../E2ETestUtils' import { createDefaultServer } from '../../simpleTestEnvironment' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' /** * This test verifies that the active entity and overwrites are calculated correctly, regardless of the order in which the entities where deployed. @@ -28,10 +27,8 @@ describe('Integration - Order Check', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) beforeAll(async () => { diff --git a/content/test/integration/ports/deployer/same-timestamp-check.spec.ts b/content/test/integration/ports/deployer/same-timestamp-check.spec.ts index 9679c4d37..88f1d2d36 100644 --- a/content/test/integration/ports/deployer/same-timestamp-check.spec.ts +++ b/content/test/integration/ports/deployer/same-timestamp-check.spec.ts @@ -4,7 +4,6 @@ import { AppComponents } from '../../../../src/types' import { makeNoopServerValidator, makeNoopValidator } from '../../../helpers/service/validations/NoOpValidator' import { buildDeployData, deployEntitiesCombo, EntityCombo } from '../../E2ETestUtils' import { TestProgram } from '../../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../../simpleTestEnvironment' const P1 = 'X1,Y1' @@ -35,10 +34,8 @@ describe('Integration - Same Timestamp Check', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it(`When oldest is deployed first, the active is the newest`, async () => { diff --git a/content/test/integration/ports/failedDeployments.spec.ts b/content/test/integration/ports/failedDeployments.spec.ts index 457fa9384..25c5df536 100644 --- a/content/test/integration/ports/failedDeployments.spec.ts +++ b/content/test/integration/ports/failedDeployments.spec.ts @@ -8,7 +8,6 @@ import { SnapshotFailedDeployment } from '../../../src/ports/failedDeployments' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from '../simpleTestEnvironment' describe('failed deployments - ', () => { @@ -22,10 +21,8 @@ describe('failed deployments - ', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) const aFailedDeployment = { diff --git a/content/test/integration/ports/processedSnapshotStorage.spec.ts b/content/test/integration/ports/processedSnapshotStorage.spec.ts index 94b4ea5f2..3da65fe3b 100644 --- a/content/test/integration/ports/processedSnapshotStorage.spec.ts +++ b/content/test/integration/ports/processedSnapshotStorage.spec.ts @@ -2,7 +2,6 @@ import * as snapshotQueries from '../../../src/logic/database-queries/snapshots- import { saveProcessedSnapshot } from '../../../src/logic/database-queries/snapshots-queries' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from '../simpleTestEnvironment' describe('precessed snapshot storage', () => { @@ -21,10 +20,8 @@ describe('precessed snapshot storage', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) describe('processedFrom', () => { diff --git a/content/test/integration/ports/snapshotStorage.spec.ts b/content/test/integration/ports/snapshotStorage.spec.ts index c89e77060..db207ee15 100644 --- a/content/test/integration/ports/snapshotStorage.spec.ts +++ b/content/test/integration/ports/snapshotStorage.spec.ts @@ -1,6 +1,5 @@ import * as snapshotQueries from '../../../src/logic/database-queries/snapshots-queries' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../simpleTestEnvironment' describe('snapshot storage', () => { @@ -12,10 +11,8 @@ describe('snapshot storage', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('should return true if the snapshot is stored', async () => { diff --git a/content/test/integration/ports/system-properties.spec.ts b/content/test/integration/ports/system-properties.spec.ts index 2ba2f55f9..c5122979b 100644 --- a/content/test/integration/ports/system-properties.spec.ts +++ b/content/test/integration/ports/system-properties.spec.ts @@ -1,6 +1,5 @@ import { createSystemProperties, SYSTEM_PROPERTIES } from '../../../src/ports/system-properties' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer } from '../simpleTestEnvironment' describe('system properties - ', () => { @@ -12,10 +11,8 @@ describe('system properties - ', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('test values', async () => { diff --git a/content/test/integration/syncronization/error-handling.spec.ts b/content/test/integration/syncronization/error-handling.spec.ts index 2d3e03956..a25906b49 100644 --- a/content/test/integration/syncronization/error-handling.spec.ts +++ b/content/test/integration/syncronization/error-handling.spec.ts @@ -18,7 +18,6 @@ import { } from '../E2EAssertions' import { awaitUntil, buildDeployData, buildDeployDataAfterEntity, createIdentity } from '../E2ETestUtils' import { TestProgram } from '../TestProgram' -import LeakDetector from 'jest-leak-detector' import { createAdditionalServer, createDefaultServer } from '../simpleTestEnvironment' describe('End 2 end - Error handling', () => { @@ -44,18 +43,14 @@ describe('End 2 end - Error handling', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server1) await server1.stopProgram() server1 = null as any - expect(await detector.isLeaking()).toBe(false) }) afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server2) await server2.stopProgram() server2 = null as any - expect(await detector.isLeaking()).toBe(false) }) //TODO: [new-sync] Check that this is being tested somewhere else diff --git a/content/test/integration/upload-and-download.spec.ts b/content/test/integration/upload-and-download.spec.ts index 7ef7b4432..b29eec0ec 100644 --- a/content/test/integration/upload-and-download.spec.ts +++ b/content/test/integration/upload-and-download.spec.ts @@ -7,7 +7,6 @@ import { assertDeploymentsAreReported, buildDeployment } from './E2EAssertions' import { buildDeployData } from './E2ETestUtils' import { getIntegrationResourcePathFor } from './resources/get-resource-path' import { TestProgram } from './TestProgram' -import LeakDetector from 'jest-leak-detector' import { createDefaultServer, resetServer } from './simpleTestEnvironment' const POINTER0 = 'X0,Y0' @@ -24,10 +23,8 @@ describe('End 2 end deploy test', () => { afterAll(async () => { jest.restoreAllMocks() - const detector = new LeakDetector(server) await server.stopProgram() server = null as any - expect(await detector.isLeaking()).toBe(false) }) it('When a user tries to deploy the same entity twice, then an exception is thrown', async () => { diff --git a/yarn.lock b/yarn.lock index 9c6b858d9..871c1e809 100644 --- a/yarn.lock +++ b/yarn.lock @@ -937,13 +937,6 @@ terminal-link "^2.0.0" v8-to-istanbul "^8.1.0" -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== - dependencies: - "@sinclair/typebox" "^0.24.1" - "@jest/source-map@^27.5.1": version "27.5.1" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" @@ -1125,11 +1118,6 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== -"@sinclair/typebox@^0.24.1": - version "0.24.51" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" - integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA== - "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.3": version "1.8.3" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" @@ -4142,11 +4130,6 @@ jest-get-type@^27.5.1: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== -jest-get-type@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.2.0.tgz#726646f927ef61d583a3b3adb1ab13f3a5036408" - integrity sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA== - jest-haste-map@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" @@ -4208,14 +4191,6 @@ jest-leak-detector@^27.5.1: jest-get-type "^27.5.1" pretty-format "^27.5.1" -jest-leak-detector@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.3.1.tgz#95336d020170671db0ee166b75cd8ef647265518" - integrity sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA== - dependencies: - jest-get-type "^29.2.0" - pretty-format "^29.3.1" - jest-matcher-utils@^27.0.0, jest-matcher-utils@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" @@ -5518,15 +5493,6 @@ pretty-format@^27.0.0, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" -pretty-format@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.3.1.tgz#1841cac822b02b4da8971dacb03e8a871b4722da" - integrity sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg== - dependencies: - "@jest/schemas" "^29.0.0" - ansi-styles "^5.0.0" - react-is "^18.0.0" - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -5664,11 +5630,6 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@^18.0.0: - version "18.2.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" - integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== - read-yaml-file@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/read-yaml-file/-/read-yaml-file-2.1.0.tgz#c5866712db9ef5343b4d02c2413bada53c41c4a9"