Skip to content

Commit 4a74839

Browse files
committed
add pgbouncer user
1 parent cc45860 commit 4a74839

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.circleci/test-server.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,11 @@ echo -e "\n<########## TEST GRAPHQL-ENGINE WITH HORIZONTAL SCALING ########>\n"
366366
HASURA_HS_TEST_DB='postgres://postgres:postgres@localhost:6543/hs_hge_test'
367367
psql "$HASURA_GRAPHQL_DATABASE_URL" -c "create database hs_hge_test;"
368368

369+
# create pgbouncer user
370+
useradd pgbouncer
371+
369372
# start pgbouncer
370-
pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini
373+
su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer
371374

372375
# start 1st server
373376
"$GRAPHQL_ENGINE" --database-url "$HASURA_HS_TEST_DB" serve >> "$OUTPUT_FOLDER/graphql-engine.log" 2>&1 & PID=$!
@@ -386,7 +389,7 @@ pytest -vv --hge-url="$HGE_URL" --pg-url="$HASURA_GRAPHQL_DATABASE_URL" --test-h
386389
psql "postgres://postgres:postgres@localhost:6543/pgbouncer" -c "SHUTDOWN;"
387390

388391
# start pgbouncer again
389-
pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini
392+
su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer
390393

391394
# run test
392395
pytest -vv --hge-url="$HGE_URL" --pg-url="$HASURA_GRAPHQL_DATABASE_URL" --test-hge-scale-url="http://localhost:8081" test_horizontal_scale.py

0 commit comments

Comments
 (0)