diff --git a/plugins/inputs/postgresql/postgresql_test.go b/plugins/inputs/postgresql/postgresql_test.go index 0ae557a8eb672..98e5c0ee26065 100644 --- a/plugins/inputs/postgresql/postgresql_test.go +++ b/plugins/inputs/postgresql/postgresql_test.go @@ -21,7 +21,9 @@ func launchTestContainer(t *testing.T) *testutil.Container { "POSTGRES_HOST_AUTH_METHOD": "trust", }, WaitingFor: wait.ForAll( - wait.ForLog("database system is ready to accept connections"), + // the database comes up twice, once right away, then again a second + // time after the docker entrypoint starts configuraiton + wait.ForLog("database system is ready to accept connections").WithOccurrence(2), wait.ForListeningPort(nat.Port(servicePort)), ), }