Skip to content

Commit dd29098

Browse files
authored
chore: improve process management in upgrade test script (#985)
Replace `daemon` mode with a backgrounded foreground process (`start ... &`) so the BEAM PID is captured directly via `$!`, removing the fragile `pgrep` dependency. Output is redirected to `/tmp/supavisor_upgrade_test.log`. Also removes `METRICS_DISABLED=true` for a more realistic test environment.
1 parent 97c2112 commit dd29098

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

scripts/test_upgrade.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export FLY_ALLOC_ID=111e4567-e89b-12d3-a456-426614174000
2121
export SECRET_KEY_BASE="dev"
2222
export CLUSTER_POSTGRES="true"
2323
export DB_POOL_SIZE="5"
24-
export METRICS_DISABLED="true"
2524
export RELEASE_COOKIE="upgrade_test_cookie"
2625

2726
# ── Helpers ──────────────────────────────────────────────────────────
@@ -89,10 +88,9 @@ mix deps.get --only prod
8988
mix release supavisor --overwrite
9089

9190
# ── 3. Start release & create tenant ────────────────────────────────
92-
info "Starting release as daemon"
93-
$REL_BIN daemon
94-
95-
BEAM_PID=$(pgrep -f "supavisor.*node1@127.0.0.1")
91+
info "Starting release in background"
92+
$REL_BIN start > /tmp/supavisor_upgrade_test.log 2>&1 &
93+
BEAM_PID=$!
9694
info "BEAM PID: ${BEAM_PID}"
9795

9896
wait_for_api

0 commit comments

Comments
 (0)