Skip to content

Commit 65fcfbf

Browse files
committed
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.
1 parent 4f12d69 commit 65fcfbf

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

tests/discovery/test_registrar.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,10 @@ async def kill_transport(
520520

521521

522522

523+
# ?TODO, do a OSc style signalling test on this?
524+
# -[ ] doesn't work for fork backends
525+
# @pytest.mark.parametrize('use_signal', [False, True])
526+
#
523527
# Wall-clock bound via `pytest-timeout` (`method='thread'`).
524528
# Under `--spawn-backend=subint` this test can wedge in an
525529
# un-Ctrl-C-able state (abandoned-subint + shared-GIL
@@ -532,19 +536,21 @@ async def kill_transport(
532536
# the intended behavior here; the alternative is an unattended
533537
# suite run that never returns.
534538
@pytest.mark.timeout(
535-
3, # NOTE should be a 2.1s happy path.
539+
30,
540+
# NOTE should be a 2.1s happy path.
541+
# XXX for `subint_forkserver` this is SUPER SENSITIVE so keep it
542+
# higher to avoid flaky runs..
536543
method='thread',
537544
)
538545
@pytest.mark.skipon_spawn_backend(
539546
'subint',
547+
# 'subint_forkserver',
540548
reason=(
541549
'XXX SUBINT HANGING TEST XXX\n'
542550
'See oustanding issue(s)\n'
543551
# TODO, put issue link!
544552
)
545553
)
546-
# @pytest.mark.parametrize('use_signal', [False, True])
547-
#
548554
def test_stale_entry_is_deleted(
549555
debug_mode: bool,
550556
daemon: subprocess.Popen,
@@ -558,7 +564,6 @@ def test_stale_entry_is_deleted(
558564
559565
'''
560566
async def main():
561-
562567
name: str = 'transport_fails_actor'
563568
_reg_ptl: tractor.Portal
564569
an: tractor.ActorNursery
@@ -591,6 +596,14 @@ async def main():
591596
await ptl.cancel_actor()
592597
await an.cancel()
593598

599+
# XXX, for tracing if this starts being flaky again..
600+
#
601+
# async def _timeout_main():
602+
# with trio.move_on_after(4) as cs:
603+
# await main()
604+
# if cs.cancel_called:
605+
# await tractor.pause()
606+
594607
# TODO, remove once the `[subint]` variant no longer hangs.
595608
#
596609
# Status (as of Phase B hard-kill landing):
@@ -641,3 +654,4 @@ async def main():
641654
path=f'/tmp/test_stale_entry_is_deleted_{start_method}.dump',
642655
):
643656
trio.run(main)
657+
# trio.run(_timeout_main)

0 commit comments

Comments
 (0)