From b312ccf1ec6389cd4b73bce59472a4f41775008f Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Thu, 16 Jun 2022 13:47:19 -0600 Subject: [PATCH] test: update wait for statement for postgres (#11309) --- plugins/inputs/postgresql/postgresql_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/inputs/postgresql/postgresql_test.go b/plugins/inputs/postgresql/postgresql_test.go index 0ae557a8e..98e5c0ee2 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)), ), }