Skip to content

Commit eae65a0

Browse files
committed
chore: update run_tests.sh
Signed-off-by: Xin Liu <[email protected]>
1 parent ffae9ce commit eae65a0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

run_tests.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,23 @@ if ! command -v hurl &> /dev/null; then
8686
fi
8787
fi
8888

89-
# Clean up any existing server process
90-
cleanup() {
89+
# Clean up server process (but keep Docker services running)
90+
cleanup_server() {
9191
if [ ! -z "$SERVER_PID" ]; then
9292
echo -e "${YELLOW}🛑 Stopping server (PID: $SERVER_PID)${NC}"
9393
kill $SERVER_PID 2>/dev/null || true
9494
wait $SERVER_PID 2>/dev/null || true
9595
fi
9696
rm -f /tmp/ss-proxy.pid
97+
}
9798

98-
# Stop Docker services
99+
# Clean up everything (server + Docker services)
100+
cleanup_all() {
101+
cleanup_server
99102
stop_docker_services
100103
}
101104

102-
trap cleanup EXIT
105+
trap cleanup_all EXIT
103106

104107
# Start Docker services if enabled
105108
if [ "$USE_DOCKER_SERVICES" = true ]; then
@@ -206,7 +209,7 @@ fi
206209

207210
echo ""
208211
echo "🛑 Step 5: Stopping server for Rust integration tests..."
209-
cleanup
212+
cleanup_server
210213
sleep 2
211214

212215
echo ""

0 commit comments

Comments
 (0)