Pull requests / #2994
#2994 bench: the start-its-own-server path names its port again
open · @victorgabr · 0 コメント · GitHub で見る
本文
69fe4055 (#2330) inlined the port into `server_base(...)` and dropped the `port = a.port or int(cfg.get("port", 8080))` assignment, but three uses of `port` below it stayed: the port-in-use line, the "Starting the server on port" line, and the `start_server(cfg_path, port, ...)` call itself. Running `tools/strata_bench.py` with no server already up now dies before launching one:
```
NameError: name 'port' is not defined. Did you mean: 'props'?
```
`test_bench_host.py` only exercised `server_base` in isolation, so the path stayed unpinned.
**Changes:** one line in `main()` — `port` is assigned again and passed to `server_base`. Nothing else moves. **Adds:** `StartServerPort` in `tools/test_bench_host.py`, which drives `main()` down the start-its-own-server branch with `start_server`/`wait_ready` stubbed — no GPU, no server, no network — and asserts the config's port and the `--port` override reach `start_server`.
**How I checked:** the new tests raise the NameError on the file before the fix and pass after (`python -m unittest tools.test_bench_host`: 7/7). End to end on a TITAN RTX: with the fix, the bench started its own server and wrote three full community reports today (runs with and without STRATA_ROUTE_TAIL_SKIP); without it every such run crashed at the line above.関連リンク
インストール・モデル・リリースへの站内リンク。