Skip to content

Commit

Permalink
Fix memory tests timing out after c3ade07
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangwalther committed Jan 24, 2022
1 parent d2791ea commit fae1e16
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/memory/memory-tests.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#! /usr/bin/env bash
#!/usr/bin/env bash

# This test script expects that a `postgrest` executable with profiling enabled
# is on the PATH.

set -eu
set -Eeuo pipefail

pgrPort=49421

# PGRST_DB_URI, PGRST_DB_ANON_ROLE and PGRST_DB_SCHEMAS are expected to be set by with_tmp_db
export PGRST_DB_ANON_ROLE="postgrest_test_anonymous"
export PGRST_DB_POOL="1"
export PGRST_SERVER_HOST="127.0.0.1"
export PGRST_SERVER_PORT="$pgrPort"
Expand All @@ -22,7 +22,7 @@ result(){ echo "$1 $currentTest $2"; currentTest=$(( currentTest + 1 )); }
ok(){ result 'ok' "- $1"; }
ko(){ result 'not ok' "- $1"; failedTests=$(( failedTests + 1 )); }

pgrStart(){ postgrest +RTS -p -h > /dev/null & pgrPID="$!"; }
pgrStart(){ postgrest +RTS -p -h > /dev/null 2>&1 & pgrPID="$!"; }
pgrStop(){ kill "$pgrPID" 2>/dev/null; }

checkPgrStarted(){
Expand Down

0 comments on commit fae1e16

Please sign in to comment.