diff --git a/tests/test_inter_peer_cancellation.py b/tests/test_inter_peer_cancellation.py index 49854a99..b79c0393 100644 --- a/tests/test_inter_peer_cancellation.py +++ b/tests/test_inter_peer_cancellation.py @@ -24,6 +24,8 @@ from tractor._testing import ( expect_ctxc, ) +from .conftest import cpu_scaling_factor + # XXX TODO cases: # - [x] WE cancelled the peer and thus should not see any raised # `ContextCancelled` as it should be reaped silently? @@ -1030,6 +1032,7 @@ def test_peer_spawns_and_cancels_service_subactor( reg_addr: tuple[str, int], raise_sub_spawn_error_after: float|None, loglevel: str, + test_log: tractor.log.StackLevelAdapter, # ^XXX, set to 'warning' to see masked-exc warnings # that may transpire during actor-nursery teardown. ): @@ -1250,9 +1253,20 @@ def test_peer_spawns_and_cancels_service_subactor( # assert spawn_ctx.cancelled_caught + async def _main(): + headroom: float = cpu_scaling_factor() + this_fast_on_linux: float = 3 + this_fast = this_fast_on_linux * headroom + if headroom != 1.: + test_log.warning( + f'Adding latency headroom on linux bc CPU scaling,\n' + f'headroom: {headroom}\n' + f'this_fast_on_linux: {this_fast_on_linux} -> {this_fast}\n' + ) with trio.fail_after( - 3 if not debug_mode + this_fast + if not debug_mode else 999 ): await main() diff --git a/tests/test_spawning.py b/tests/test_spawning.py index 7e230085..7f3421fe 100644 --- a/tests/test_spawning.py +++ b/tests/test_spawning.py @@ -40,7 +40,7 @@ async def spawn( assert actor is None # no runtime yet async with ( tractor.open_root_actor( - arbiter_addr=reg_addr, + registry_addrs=[reg_addr], ), tractor.open_nursery() as an, ): @@ -203,7 +203,7 @@ def test_loglevel_propagated_to_subactor( async with tractor.open_nursery( name='registrar', start_method=start_method, - arbiter_addr=reg_addr, + registry_addrs=[reg_addr], ) as tn: await tn.run_in_actor( diff --git a/tests/test_task_broadcasting.py b/tests/test_task_broadcasting.py index b57d63f8..9ea251d2 100644 --- a/tests/test_task_broadcasting.py +++ b/tests/test_task_broadcasting.py @@ -75,7 +75,7 @@ async def open_sequence_streamer( ) -> tractor.MsgStream: async with tractor.open_nursery( - arbiter_addr=reg_addr, + registry_addrs=[reg_addr], start_method=start_method, ) as an: