Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
Signed-off-by: aaronzuo <anarionzuo@outlook.com>
  • Loading branch information
Anarion-zuo authored and ntkathole committed Apr 5, 2026
commit 82bb408a6c8f763fcdcc64dfbf9ab12a2a6b5db8
22 changes: 19 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,34 @@ jobs:
curl -fsS http://127.0.0.1:6566/health >/dev/null
- name: Validate MCP endpoint
run: |
rm -f /tmp/mcp_headers
rm -f /tmp/mcp_headers /tmp/mcp_headers2

curl -sS -D /tmp/mcp_headers -o /dev/null --max-time 10 \
-H "Accept: text/event-stream, application/json" \
-H "mcp-protocol-version: 2025-03-26" \
http://127.0.0.1:6566/mcp || true

SESSION_ID=$(grep -i "^mcp-session-id:" /tmp/mcp_headers | head -1 | awk '{print $2}' | tr -d '\r')
if [ -z "${SESSION_ID}" ]; then
cat /tmp/mcp_headers || true
exit 1
fi

for i in $(seq 1 10); do
curl -sS -D /tmp/mcp_headers -o /dev/null --max-time 10 \
rm -f /tmp/mcp_headers2
curl -sS -D /tmp/mcp_headers2 -o /dev/null --max-time 10 \
-H "Accept: text/event-stream, application/json" \
-H "mcp-protocol-version: 2025-03-26" \
-H "mcp-session-id: ${SESSION_ID}" \
http://127.0.0.1:6566/mcp || true
if grep -Eq "^HTTP/.* 200" /tmp/mcp_headers && grep -Eiq "^content-type: text/event-stream" /tmp/mcp_headers; then
if grep -Eq "^HTTP/.* 200" /tmp/mcp_headers2 && grep -Eiq "^content-type: text/event-stream" /tmp/mcp_headers2; then
exit 0
fi
sleep 1
done

cat /tmp/mcp_headers || true
cat /tmp/mcp_headers2 || true
exit 1
- name: Stop feature server
if: always()
Expand Down