diff --git a/packages/server/package.json b/packages/server/package.json index 954a96b2e6..461ac2d777 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -147,7 +147,8 @@ "tsconfig-paths": "4.0.0", "typescript": "5.2.2", "update-dotenv": "1.1.1", - "yargs": "13.2.4" + "yargs": "13.2.4", + "node-duration": "1.0.4" }, "optionalDependencies": { "oracledb": "5.3.0" diff --git a/packages/server/scripts/integrations/postgres/docker-compose.yml b/packages/server/scripts/integrations/postgres/docker-compose.yml index 0e8e30ecdb..53e1a1812d 100644 --- a/packages/server/scripts/integrations/postgres/docker-compose.yml +++ b/packages/server/scripts/integrations/postgres/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.8" services: db: container_name: postgres - image: postgres:15-bullseye + image: postgres:latest restart: unless-stopped environment: POSTGRES_USER: root diff --git a/packages/server/src/integrations/tests/utils/postgres.ts b/packages/server/src/integrations/tests/utils/postgres.ts index 21f5dbb352..eb39a97a68 100644 --- a/packages/server/src/integrations/tests/utils/postgres.ts +++ b/packages/server/src/integrations/tests/utils/postgres.ts @@ -1,5 +1,6 @@ import { Datasource, SourceName } from "@budibase/types" import { GenericContainer, Wait, StartedTestContainer } from "testcontainers" +import { Duration, TemporalUnit } from "node-duration" import env from "../../../environment" let container: StartedTestContainer | undefined @@ -15,7 +16,9 @@ export async function getDsConfig(): Promise { .withExposedPorts(5432) .withEnv("POSTGRES_PASSWORD", "password") .withWaitStrategy( - Wait.forLogMessage("database system is ready to accept connections") + Wait.forLogMessage( + "PostgreSQL init process complete; ready for start up." + ).withStartupTimeout(new Duration(2, TemporalUnit.SECONDS)) ) .start() } diff --git a/yarn.lock b/yarn.lock index 63684b6278..8677793f34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15568,7 +15568,7 @@ node-addon-api@^6.1.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" integrity sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA== -node-duration@^1.0.4: +node-duration@1.0.4, node-duration@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/node-duration/-/node-duration-1.0.4.tgz#3e94ecc0e473691c89c4560074503362071cecac" integrity sha512-eUXYNSY7DL53vqfTosggWkvyIW3bhAcqBDIlolgNYlZhianXTrCL50rlUJWD1eRqkIxMppXTfiFbp+9SjpPrgA==