pjfanning commented on code in PR #407:
URL: 
https://github.com/apache/pekko-persistence-r2dbc/pull/407#discussion_r3414534759


##########
.github/workflows/build-test.yml:
##########
@@ -78,9 +78,16 @@ jobs:
 
       - name: Start DB
         run: |-
-          docker compose -f docker/docker-compose-postgres.yml up -d
-          # TODO: could we poll the port instead of sleep?
-          sleep 10
+          docker compose -f docker/docker-compose-postgres.yml up -d --wait
+          # loop to wait for the DB to be ready
+          for i in {1..8}; do
+            if docker exec -i docker-postgres-db-1 psql -U postgres \
+                -t -c 'SELECT 1;' 2>/dev/null; then
+              break
+            fi
+            echo "Retry $i: DDL script failed, waiting before retry..."

Review Comment:
   message adjusted



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to