From fae1e168a7d9378bc4d91d62d96db305f4de5d2f Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 24 Jan 2022 10:22:40 +0100 Subject: [PATCH] Fix memory tests timing out after c3ade07 --- test/memory/memory-tests.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/memory/memory-tests.sh b/test/memory/memory-tests.sh index 6fa3b2047..1ecbd2e43 100755 --- a/test/memory/memory-tests.sh +++ b/test/memory/memory-tests.sh @@ -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" @@ -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(){