From 015a91c1833a3168416de5ac7258f654aa58dbd4 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 6 Feb 2023 20:12:08 +0000 Subject: [PATCH] Increase timeout --- .../server/src/integration-test/postgres.spec.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/server/src/integration-test/postgres.spec.ts b/packages/server/src/integration-test/postgres.spec.ts index ba65f01eb6..879338dfdb 100644 --- a/packages/server/src/integration-test/postgres.spec.ts +++ b/packages/server/src/integration-test/postgres.spec.ts @@ -15,10 +15,12 @@ import { import _ from "lodash" import { generator } from "@budibase/backend-core/tests" import { utils } from "@budibase/backend-core" -import { GenericContainer, StartedTestContainer } from "testcontainers" +import { GenericContainer } from "testcontainers" const config = setup.getConfig()! +jest.setTimeout(30000) + jest.unmock("pg") describe("row api - postgres", () => { @@ -30,16 +32,14 @@ describe("row api - postgres", () => { let host: string let port: number - let postgresContainer: StartedTestContainer - beforeAll(async () => { - postgresContainer = await new GenericContainer("postgres") + const container = await new GenericContainer("postgres") .withExposedPorts(5432) .withEnv("POSTGRES_PASSWORD", "password") .start() - host = postgresContainer.getContainerIpAddress() - port = postgresContainer.getMappedPort(5432) + host = container.getContainerIpAddress() + port = container.getMappedPort(5432) await config.init() const apiKey = await config.generateApiKey() @@ -134,7 +134,6 @@ describe("row api - postgres", () => { }) afterAll(async () => { - await postgresContainer?.stop() await config.end() })