mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2558] [CLOSED] tests: the MCP server's tests do not see a Strata server this PC already runs on 8080 #4123
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2558
Author: @qiuzan2001
Created: 10/15/2026
Status: ❌ Closed
Base:
main← Head:chief-serve/mcp-tests-port📝 Commits (1)
c2b1df7tests: the MCP server's tests do not see a Strata server this PC already runs on 8080📊 Changes
1 file changed (+12 additions, -3 deletions)
View changed files
📝
tools/test_strata_mcp.py(+12 -3)📄 Description
Same family as #1935 (tests that pass or fail depending on the PC), not in its list.
What it changes.
tools/strata_mcp.py's tools look at the default port (8080) and at every config's port. Thefake Strata folder in
tools/test_strata_mcp.pywrote its configs with port 8080 (the fakesetup.pyandwrite_config()), and the default port was the real one. On a PC that runs Strata on 8080 (the normal install), theStartStoptests found that server in the fake folder's status:test_start_status_bench_stop,test_loading_then_ready,test_status_sees_other_programs_on_the_portfailed andtest_never_kills_an_unrelated_processerrored ('loading' not found in 'Strata is running on port 8080: swift-1.5-iq3_s, idle; installed: q2_0'), andtest_plan_then_installsent/health,/status,/metricsand/v1/statusto the real server. Each test now gets a free port of its own inFakeRoot.setUp:M.DEFAULT_PORTispatched to it, the fake
setup.pywrites it into the configs it makes, andwrite_config()uses it unless a testnames a port.
test_plan_then_installalso checks that nothing is reported running.What it leaves alone.
tools/strata_mcp.py, and what every test checks. Tests that already chose a port withfree_port()keep it.How it was checked. On this PC (Ubuntu, Python 3.14) with Strata 0.1.44.1 serving on 127.0.0.1:8080:
python3 tools/test_strata_mcp.pygives 3 failures and 1 error onupstream/main, and 24 OK with this change in 13of 14 runs (one run had 1 error I could not reproduce in 13 more runs; I did not find which test). With a wrapper
that counts socket connections to port 8080, the suite makes none (it made one with only the default-port part of
this change). Not run on a PC with nothing on 8080.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.