Skip to content

sdk/python: the upgrade fake stops listening once it accepts - #533

Merged
CMGS merged 1 commit into
mainfrom
test/upgrade-fake-listener
Nov 9, 2026
Merged

CMGS merged 1 commit into
mainfrom
test/upgrade-fake-listener

Conversation

@CMGS

@CMGS CMGS commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

A refused upgrade (404) rebinds the sandbox handle. The rebind's peers lookup connects to the fake agent's listener, which is still open but no longer accepting, so the lookup waits out two 5 s timeouts. Each of the two test_rejected_upgrade_is_an_api_error cases took 10.00 s.

The fake now closes its listener right after accept, so the lookup is refused at once. The assertions are unchanged.

Measured in python:3.10, with the arms interleaved base, patch, patch, base:

arm tests/test_upgrade.py sdk/python suite
base 20.26 s / 20.27 s 87.60 s / 86.04 s
patch 0.22 s / 0.22 s 65.26 s / 65.51 s

All 294 tests pass in both arms. ruff format --check and ruff check are clean.

A refused upgrade rebinds the handle, and its peers lookup queued on the
fake's still-open listener until two 5 s timeouts ran out. Closing the
listener makes the lookup fail at once: test_upgrade.py drops from 20.3 s
to 0.22 s and the SDK suite from ~87 s to ~65 s on python:3.10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant