From 94dfeb14410c971dc42d6da427c88a484de975ea Mon Sep 17 00:00:00 2001 From: goodboy Date: Mon, 2 Mar 2026 12:11:49 -0500 Subject: [PATCH] Add delay before root-actor open, macos in CI.. --- tests/test_multi_program.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_multi_program.py b/tests/test_multi_program.py index 17003e1c..20e13f97 100644 --- a/tests/test_multi_program.py +++ b/tests/test_multi_program.py @@ -35,6 +35,9 @@ if TYPE_CHECKING: ) +_non_linux: bool = platform.system() != 'Linux' + + def test_abort_on_sigint( daemon: subprocess.Popen, ): @@ -137,6 +140,7 @@ def test_non_registrar_spawns_child( reg_addr: UnwrappedAddress, loglevel: str, debug_mode: bool, + ci_env: bool, ): ''' Ensure a non-regristar (serving) root actor can spawn a sub and @@ -148,6 +152,12 @@ def test_non_registrar_spawns_child( ''' async def main(): + + # XXX, since apparently on macos in GH's CI it can be a race + # with the `daemon` registrar on grabbing the socket-addr.. + if ci_env and _non_linux: + await trio.sleep(.5) + async with tractor.open_nursery( registry_addrs=[reg_addr], loglevel=loglevel,