diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index 6ca64f0d..b490b693 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -37,6 +37,24 @@ jobs: - name: Install psql run: sudo apt install postgresql-client + - name: Set Max Connection Limit + run: | + export PGHOST=localhost + export PGUSER=postgres + export PGPASSWORD=test1234 + psql -h localhost -U postgres -c "ALTER SYSTEM SET max_connections = '100';" + + - name: Verify Max Connection Limit + run: | + export PGHOST=localhost + export PGUSER=postgres + export PGPASSWORD=test1234 + MAX_CONNECTIONS=$(PGPASSWORD=test1234 psql -h localhost -U postgres -d postgres -c "SHOW max_connections;" | grep -oP '(?<=row )[0-9]+') + if [ "$MAX_CONNECTIONS" -ne "10" ]; then + echo "Max connections is not set correctly!" + exit 1 + fi + - name: Run the smoke test run: | set -eu diff --git a/docker-compose.yml b/docker-compose.yml index 2141a4f6..c985af72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,8 @@ services: environment: POSTGRES_USER: timescaledb POSTGRES_PASSWORD: postgrespassword - + POSTGRES_MAX_CONNECTIONS: 10 + graphql-engine: image: hasura/graphql-engine:latest ports: