diff --git a/.circleci/test-server.sh b/.circleci/test-server.sh index a8e854f54593e..403e0f483178d 100755 --- a/.circleci/test-server.sh +++ b/.circleci/test-server.sh @@ -366,8 +366,11 @@ echo -e "\n<########## TEST GRAPHQL-ENGINE WITH HORIZONTAL SCALING ########>\n" HASURA_HS_TEST_DB='postgres://postgres:postgres@localhost:6543/hs_hge_test' psql "$HASURA_GRAPHQL_DATABASE_URL" -c "create database hs_hge_test;" +# create pgbouncer user +useradd pgbouncer + # start pgbouncer -pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini +su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer # start 1st server "$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 psql "postgres://postgres:postgres@localhost:6543/pgbouncer" -c "SHUTDOWN;" # start pgbouncer again -pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini +su -c "pgbouncer -d /root/graphql-engine/.circleci/pgbouncer/pgbouncer.ini" pgbouncer # run test pytest -vv --hge-url="$HGE_URL" --pg-url="$HASURA_GRAPHQL_DATABASE_URL" --test-hge-scale-url="http://localhost:8081" test_horizontal_scale.py