Increase timeout
This commit is contained in:
parent
71199c06ec
commit
015a91c183
|
@ -15,10 +15,12 @@ import {
|
||||||
import _ from "lodash"
|
import _ from "lodash"
|
||||||
import { generator } from "@budibase/backend-core/tests"
|
import { generator } from "@budibase/backend-core/tests"
|
||||||
import { utils } from "@budibase/backend-core"
|
import { utils } from "@budibase/backend-core"
|
||||||
import { GenericContainer, StartedTestContainer } from "testcontainers"
|
import { GenericContainer } from "testcontainers"
|
||||||
|
|
||||||
const config = setup.getConfig()!
|
const config = setup.getConfig()!
|
||||||
|
|
||||||
|
jest.setTimeout(30000)
|
||||||
|
|
||||||
jest.unmock("pg")
|
jest.unmock("pg")
|
||||||
|
|
||||||
describe("row api - postgres", () => {
|
describe("row api - postgres", () => {
|
||||||
|
@ -30,16 +32,14 @@ describe("row api - postgres", () => {
|
||||||
let host: string
|
let host: string
|
||||||
let port: number
|
let port: number
|
||||||
|
|
||||||
let postgresContainer: StartedTestContainer
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
postgresContainer = await new GenericContainer("postgres")
|
const container = await new GenericContainer("postgres")
|
||||||
.withExposedPorts(5432)
|
.withExposedPorts(5432)
|
||||||
.withEnv("POSTGRES_PASSWORD", "password")
|
.withEnv("POSTGRES_PASSWORD", "password")
|
||||||
.start()
|
.start()
|
||||||
|
|
||||||
host = postgresContainer.getContainerIpAddress()
|
host = container.getContainerIpAddress()
|
||||||
port = postgresContainer.getMappedPort(5432)
|
port = container.getMappedPort(5432)
|
||||||
|
|
||||||
await config.init()
|
await config.init()
|
||||||
const apiKey = await config.generateApiKey()
|
const apiKey = await config.generateApiKey()
|
||||||
|
@ -134,7 +134,6 @@ describe("row api - postgres", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
await postgresContainer?.stop()
|
|
||||||
await config.end()
|
await config.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue