Adding a 2 second timeout after the message occurs to make sure DB is fully started - can't wait for both messages.
This commit is contained in:
parent
d4fd775c37
commit
870ca2266e
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<Datasource> {
|
|||
.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()
|
||||
}
|
||||
|
|
|
@ -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==
|
||||
|
|
Loading…
Reference in New Issue