From 1774934666cec31dcda8535e0b3ac966545d689e Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 1 Oct 2021 10:25:51 +0200 Subject: [PATCH] multi: fix Postgres on Travis Fixes the docker build that was caused by https://github.com/docker-library/postgres/issues/884. Using the alpine and version 13 image avoids the problem introduced with postgres 14 and debian bullseye. --- .travis.yml | 2 +- Makefile | 5 +++-- make/testing_flags.mk | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b979647f..c82d7a990 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,7 +64,7 @@ jobs: - name: Bitcoind Integration with postgres (txindex enabled) script: - bash ./scripts/install_bitcoind.sh - - make itest-parallel backend=bitcoind dbbackend=postgres + - make itest-parallel backend=bitcoind dbbackend=postgres POSTGRES_START_DELAY=10 - name: Bitcoind Integration (txindex disabled) script: diff --git a/Makefile b/Makefile index abdc3c2bd..3146905ed 100644 --- a/Makefile +++ b/Makefile @@ -194,10 +194,11 @@ ifeq ($(dbbackend),postgres) # Start a fresh postgres instance. Allow a maximum of 500 connections. # This is required for the async benchmark to pass. - docker run --name lnd-postgres -e POSTGRES_PASSWORD=postgres -p 6432:5432 -d postgres -N 500 + docker run --name lnd-postgres -e POSTGRES_PASSWORD=postgres -p 6432:5432 -d postgres:13-alpine -N 500 + docker logs -f lnd-postgres & # Wait for the instance to be started. - sleep 3 + sleep $(POSTGRES_START_DELAY) endif itest-only: db-instance diff --git a/make/testing_flags.mk b/make/testing_flags.mk index c6bfa7204..cad28daec 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -7,6 +7,7 @@ EXEC_SUFFIX = COVER_PKG = $$(go list -deps -tags="$(DEV_TAGS)" ./... | grep '$(PKG)' | grep -v lnrpc) NUM_ITEST_TRANCHES = 4 ITEST_PARALLELISM = $(NUM_ITEST_TRANCHES) +POSTGRES_START_DELAY = 5 # If rpc option is set also add all extra RPC tags to DEV_TAGS ifneq ($(with-rpc),)