Bump `test_stale_entry_is_deleted`'s timeout to 30

Seems that when run in-suite it delays more then the so-measured "happy
path" timing; better to have no suite-global interruption then asserting
a fast single test's run.
subint_forkserver_backend
Gud Boi 2026-04-27 11:46:43 -04:00
parent 4f12d69b41
commit 65fcfbf224
1 changed files with 18 additions and 4 deletions

View File

@ -520,6 +520,10 @@ async def kill_transport(
# ?TODO, do a OSc style signalling test on this?
# -[ ] doesn't work for fork backends
# @pytest.mark.parametrize('use_signal', [False, True])
#
# Wall-clock bound via `pytest-timeout` (`method='thread'`). # Wall-clock bound via `pytest-timeout` (`method='thread'`).
# Under `--spawn-backend=subint` this test can wedge in an # Under `--spawn-backend=subint` this test can wedge in an
# un-Ctrl-C-able state (abandoned-subint + shared-GIL # un-Ctrl-C-able state (abandoned-subint + shared-GIL
@ -532,19 +536,21 @@ async def kill_transport(
# the intended behavior here; the alternative is an unattended # the intended behavior here; the alternative is an unattended
# suite run that never returns. # suite run that never returns.
@pytest.mark.timeout( @pytest.mark.timeout(
3, # NOTE should be a 2.1s happy path. 30,
# NOTE should be a 2.1s happy path.
# XXX for `subint_forkserver` this is SUPER SENSITIVE so keep it
# higher to avoid flaky runs..
method='thread', method='thread',
) )
@pytest.mark.skipon_spawn_backend( @pytest.mark.skipon_spawn_backend(
'subint', 'subint',
# 'subint_forkserver',
reason=( reason=(
'XXX SUBINT HANGING TEST XXX\n' 'XXX SUBINT HANGING TEST XXX\n'
'See oustanding issue(s)\n' 'See oustanding issue(s)\n'
# TODO, put issue link! # TODO, put issue link!
) )
) )
# @pytest.mark.parametrize('use_signal', [False, True])
#
def test_stale_entry_is_deleted( def test_stale_entry_is_deleted(
debug_mode: bool, debug_mode: bool,
daemon: subprocess.Popen, daemon: subprocess.Popen,
@ -558,7 +564,6 @@ def test_stale_entry_is_deleted(
''' '''
async def main(): async def main():
name: str = 'transport_fails_actor' name: str = 'transport_fails_actor'
_reg_ptl: tractor.Portal _reg_ptl: tractor.Portal
an: tractor.ActorNursery an: tractor.ActorNursery
@ -591,6 +596,14 @@ def test_stale_entry_is_deleted(
await ptl.cancel_actor() await ptl.cancel_actor()
await an.cancel() await an.cancel()
# XXX, for tracing if this starts being flaky again..
#
# async def _timeout_main():
# with trio.move_on_after(4) as cs:
# await main()
# if cs.cancel_called:
# await tractor.pause()
# TODO, remove once the `[subint]` variant no longer hangs. # TODO, remove once the `[subint]` variant no longer hangs.
# #
# Status (as of Phase B hard-kill landing): # Status (as of Phase B hard-kill landing):
@ -641,3 +654,4 @@ def test_stale_entry_is_deleted(
path=f'/tmp/test_stale_entry_is_deleted_{start_method}.dump', path=f'/tmp/test_stale_entry_is_deleted_{start_method}.dump',
): ):
trio.run(main) trio.run(main)
# trio.run(_timeout_main)