Wrap cluster test in `trio.fail_after()`

Add a 6s timeout guard around `test_streaming_to_actor_cluster()`
to catch hangs, and nest the `async with` block inside it.
Found this when running `pytest tests/ --tpt-proto uds`.

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
ns_aware
Gud Boi 2026-03-08 15:05:32 -04:00
parent 65660c77c7
commit 1e0c57c6c5
1 changed files with 15 additions and 14 deletions

View File

@ -56,13 +56,14 @@ async def worker(
print(msg)
assert msg == MESSAGE
# TODO: does this ever cause a hang
# ?TODO, does this ever cause a hang?
# assert 0
@tractor_test
async def test_streaming_to_actor_cluster() -> None:
async def test_streaming_to_actor_cluster():
with trio.fail_after(6):
async with (
open_actor_cluster(modules=[__name__]) as portals,