Commit Graph

58 Commits (sigintsaviour_citesthackin)

Author SHA1 Message Date
Tyler Goodlet fec2ba004c Bleh more nested actor hackin.. 2022-07-31 15:42:13 -04:00
Tyler Goodlet ba9c914221 Allow for tree death in CI? 2022-07-31 14:41:39 -04:00
Tyler Goodlet 30ee3f2dcc Just skip expecting attach msg in CI for ctlc cases 2022-07-29 20:52:54 -04:00
Tyler Goodlet 0b4fc4fc47 Use `assert_before` more extensively 2022-07-29 19:56:11 -04:00
Tyler Goodlet 6b8c193221 Add another name hack for CI race conditions.. 2022-07-29 18:57:44 -04:00
Tyler Goodlet 05167bdc70 Try less times for EOF 2022-07-29 17:51:33 -04:00
Tyler Goodlet 4366873582 Handle missing prompt render case? 2022-07-29 15:59:10 -04:00
Tyler Goodlet 0ab49cd244 Disable `pygments` highlighting on ctlc tests 2022-07-29 13:00:06 -04:00
Tyler Goodlet 3fafa87ea9 Avoid infinite wait for EOF 2022-07-29 12:20:56 -04:00
Tyler Goodlet a6f5b9396a Use `pytest-timeout` plug to try and prevent CI hang 2022-07-29 11:11:54 -04:00
Tyler Goodlet 61af2dc5aa Add timeout on spawn error msg check 2022-07-29 09:31:11 -04:00
Tyler Goodlet 3bc4778950 Drop ctlc tests on Py3.9...
After many tries I just don't think it's worth it to make the tests work
since the repl UX in `pdbpp` is so unreliable in the latest release and
honestly we're trying to go 3.10+ ASAP.

Further,
- entirely drop the pattern matching inside the `do_ctlc()` for now.
- add a `subactor_error` parametrization that catches a case that
  previously caused a hang (when you use 'next' immediately after the
  first crash/debug lock (the fix was pushed just before this commit).
2022-07-28 14:24:51 -04:00
Tyler Goodlet 58956ae950 Try disabling prompt expect in ctrlc cases 2022-07-28 09:00:41 -04:00
Tyler Goodlet c132b7f624 Add before assert helper and print console bytes on fail 2022-07-27 11:40:03 -04:00
Tyler Goodlet b659326d5b Do child decode on `do_ctlc` exit? 2022-07-27 11:40:03 -04:00
Tyler Goodlet d971e9bc9d Add ctl-c to remaining tests, only expect prompt in non-CI 2022-07-27 11:40:03 -04:00
Tyler Goodlet 611120c67c Add ctl-c case to `subactor_breakpoint` example test 2022-07-27 11:40:03 -04:00
Tyler Goodlet fe4adbf6f0 Disable ctl-c prompt checks again 2022-07-27 11:40:03 -04:00
Tyler Goodlet 6ccfeb17d5 Add back prompt expect via flag 2022-07-27 11:40:03 -04:00
Tyler Goodlet 9bed332a94 Test: drop expect prompt 2022-07-27 11:40:03 -04:00
Tyler Goodlet e519df1bd2 Add longer delays around ctl-c loop, don't expect longlist 2022-07-27 11:40:02 -04:00
Tyler Goodlet 24fd87d969 Add sleep around ctl-c iteration loop 2022-07-27 11:40:02 -04:00
Tyler Goodlet 3b7985292f TOSQUASH: add note around delay 2022-07-27 11:40:02 -04:00
Tyler Goodlet f7823a46b8 Add slight delay 2nd ctlc round.. 2022-07-27 11:40:02 -04:00
Tyler Goodlet 24b6cc0209 Add basic ctl-c testing cases to suite 2022-07-27 11:40:02 -04:00
Tyler Goodlet a38a983225 Increase debugger poll delay back to prior value
If we make it too fast a nursery with debug mode children can cancel
too fast and causes some test failures. It's likely not a huge deal
anyway since the purpose of this poll/check is for human interaction
and the current delay isn't really that noticeable.

Decrease log levels in the debug module to avoid console noise when in
use. Toss in some more detailed comments around the new debugger lock
points.
2021-12-10 11:54:27 -05:00
Tyler Goodlet 4f411d6926 Add a per actor debug mode test 2021-12-09 17:53:31 -05:00
Tyler Goodlet 95c52436e5 Adjust multi-actor debugger test
It turns out recent improvements have made the debugger too good
so we need to just terminate the continue loop in this test when
we finally see the "spawn error" crash out because the breakpoint
forever case will literally, continue forever XD
2021-12-07 16:46:03 -05:00
Tyler Goodlet b14699d40b Adjust debugger tests to expect depth > 1 crashes
With the new fixes to the trio spawner we can expect that both root
*and* depth > 1 nursery owning actors will now not clobber any children
that are in debug (either via breakpoint or through crashing). The tests
changed now include more checks which ensure the 2nd level parent-ish
actors also bubble up through into `pdb` and don't kill any of their
(crashed) children before they're done themselves debugging.
2021-10-14 13:39:46 -04:00
Tyler Goodlet c5c7e694ec Better early timeout handling, continue on child re-lock 2021-08-01 13:10:51 -04:00
Tyler Goodlet 674fbbc6b3 Docs and comments tidying 2021-08-01 10:44:13 -04:00
Tyler Goodlet f173012fea Handle repeat child tty-acquires race 2021-07-31 15:01:26 -04:00
Tyler Goodlet 13b76c9439 Add fast fail test using the context api 2021-07-31 12:46:40 -04:00
Tyler Goodlet 632c666a7d Adjust debug tests to accomodate no more root clobbering
We may get multiple re-entries to debugger by `bp_forever` sub-actor
now since the root will incrementally try to cancel it only when the tty
lock is not held.
2021-07-31 12:46:40 -04:00
Tyler Goodlet 929b6dcc83 Skip debugger tests on windows at module level 2021-07-06 13:26:30 -04:00
Tyler Goodlet 55760b3fe0 Only expect further message in non-name-error first case 2021-07-04 12:55:36 -04:00
Tyler Goodlet 9c9309faf8 Handle race for tty by child actors 2021-07-04 10:25:41 -04:00
Tyler Goodlet cd636b270e Update debug tests to expect 'root' actor name 2021-02-24 13:38:20 -05:00
Tyler Goodlet 8fabd27dbe Lint fixes 2021-02-24 13:13:51 -05:00
Tyler Goodlet 5127effd88 Drop warning level logging assert(s) 2020-12-26 15:45:55 -05:00
Tyler Goodlet a668f714d5 Allow passing function refs to `Portal.run()`
This resolves and completes #69 allowing all RPC invocation APIs to pass
function references directly instead of explicit `str` names for the
target namespace and function (this is still done implicitly
underneath).  This brings us closer to `trio`'s task running API as well
as acknowledges that any inter-host RPC system (and API) will likely
need to be implemented on top of local RPC primitives anyway. Even if
this ends up **not** being true we can always go to "function stubs" as
part of our IAC protocol or, add a new method to do explicit namespace
calls: `.run_from_module()` or whatever everyone votes on.

Resolves #69

Further, this commit drops `Actor.statespace` from the entire system
since a user can easily get this same functionality using module
level variables. Fix docs to match all these changes (luckily mostly
already done due to example scripts referencing).
2020-12-21 09:09:55 -05:00
Tyler Goodlet dc475b54ab More obnoxious CI timeout handling 2020-12-18 19:26:29 -05:00
Tyler Goodlet a95488ad2f Handle pexpect's internal timeout 2020-12-18 17:57:44 -05:00
Tyler Goodlet 47f68a0532 Skip debugger tests on non-trio backends 2020-12-17 16:37:05 -05:00
Tyler Goodlet 797bcc1df2 Handle early timeouts on last debugger test 2020-12-17 13:35:45 -05:00
Tyler Goodlet 0118589875 Add race case handling for mp backend 2020-12-12 13:30:14 -05:00
Tyler Goodlet a8406c8626 Toss in another tests with daemon subactors 2020-10-15 23:16:56 -04:00
Tyler Goodlet 61a8df358c Comments tweak 2020-10-14 09:06:40 -04:00
Tyler Goodlet fd59f4ad16 On windows .spawn dne? 2020-10-13 14:56:26 -04:00
Tyler Goodlet a934eb063c Factor `repodir()` helper into conftest.py 2020-10-13 14:49:31 -04:00