forked from goodboy/tractor
1
0
Fork 0
Commit Graph

220 Commits (cbc18f94ececaa6df767cedb7f4655ef9084d182)

Author SHA1 Message Date
Tyler Goodlet cabc41fcfa Pass func refs 2021-10-27 16:06:44 -04:00
Tyler Goodlet 7b149dd3e4 Add initial infected asyncio error propagation test 2021-10-27 16:06:44 -04:00
Tyler Goodlet d0f5c7a5e2 Change to `gather_contexts()`, use event for graceful exit
The api we've made here is actually closer to `asyncio.gather()` but
with opening async context managers instead of funcs. Use another event
to allow for graceful teardown of children on non-cancellation exits
and add a doc string.
2021-10-24 14:00:01 -04:00
overclockworked64 b91adcf38d Get rid of external teardown trigger 2021-10-23 16:17:30 -04:00
overclockworked64 c1089dbd95 Add a clustering test 2021-10-23 16:17:30 -04:00
Tyler Goodlet 4114eb1d25 Move broadcast channel parts into trionics 2021-10-23 15:54:40 -04:00
Tyler Goodlet 4f222a5f9c Use type match of expected error 2021-10-15 10:25:50 -04:00
Tyler Goodlet 533457c64d Handle nested multierror case on windows 2021-10-15 09:16:51 -04:00
Tyler Goodlet 7ee121aeaf Try to handle variable windows errors 2021-10-14 13:39:46 -04: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 2df16c1557 Lol, fix sub-actor case 2021-10-14 13:39:46 -04:00
Tyler Goodlet 5b23a3bc35 Don't expect list value from registry 2021-10-05 13:37:17 -04:00
Tyler Goodlet 19d6885243 Ensure tuple for passed in arbiter addr 2021-10-05 13:37:17 -04:00
Tyler Goodlet 93726f1392 Call registry getter method in test 2021-10-05 13:37:17 -04:00
Tyler Goodlet 4f831abe25 Hipshot, try to avoid subs teardown race 2021-10-05 12:19:24 -04:00
Tyler Goodlet b1235442fb Add longer timeout on windows 2021-10-04 12:10:39 -04:00
Tyler Goodlet d734dcede4 Accept a multierror on cancellation (windows?) 2021-10-04 11:43:50 -04:00
Tyler Goodlet 8d79d83ac2 Ensure kbi will cancel context block
Follow up to previous commit: extend our simple context test set to
include cancellation via kbi in the parent as well as timeout logic and
testing of the parent opening a stream even though the target actor does
not.

Thanks again to https://github.com/adder46/wrath for discovering this
bug.
2021-10-04 10:38:26 -04:00
Tyler Goodlet c1727ce05e Add a test of both stream styles side-by-side
Not sure we even have a test for this yet. The main issue discovered by
a user project (https://github.com/adder46/wrath) was that a kbi raised
inside a block like this (with both recv-only and send-recv streams)
would not cancel on the first ctrl-c sent from console and instead
SIGiNT had to be repeatedly sent as many times as there are subactors in
the first level tree. This test catches that as well as just verifies
the basic side-by-side functionality.
2021-10-04 10:38:22 -04:00
Tyler Goodlet 5881a82d2a Add a first receiver is cancelled test 2021-09-02 21:12:54 -04:00
Tyler Goodlet b7b489dd07 Drop shielded stream api usage 2021-09-02 21:12:54 -04:00
Tyler Goodlet 5c6355062c Shorten sequence length for test speedup 2021-09-02 21:12:54 -04:00
Tyler Goodlet d9e793d4ba Can't use built-in generics till 3.9... 2021-09-02 21:12:54 -04:00
Tyler Goodlet 5182ee7782 Add a "faster task is cancelled" test 2021-09-02 21:12:54 -04:00
Tyler Goodlet 39cf9af9fc Rename test module 2021-09-02 21:12:54 -04:00
Tyler Goodlet 0d70e3081a Add laggy parent stream tests
Add a couple more tests to check that a parent and sub-task stream can
be lagged and recovered (depending on who's slower). Factor some of the
test machinery into a new ctx mngr to make it all happen.
2021-09-02 21:12:54 -04:00
Tyler Goodlet d7ad8982ff Add subscribe after close test 2021-09-02 21:12:54 -04:00
Tyler Goodlet 2bad2bac50 Don't enable debug mode..it borks CI 2021-09-02 21:12:54 -04:00
Tyler Goodlet 236ed0b0dd Initial broadcaster tests including one to test our `MsgStream.subscribe()` api 2021-09-02 21:12:54 -04:00
Tyler Goodlet af85d35685 Drop stream shielding; it was from a legacy design
The whole origin was not having an explicit open/close semantic for
streams. We have that now so this internal mechanic isn't needed and
further our streams become more correct by having `.aclose()` be
independent of cancellation.
2021-09-02 08:24:18 -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 240f591234 Add 2-way streaming example to readme and scripts 2021-07-31 12:10:25 -04:00
Tyler Goodlet 929b6dcc83 Skip debugger tests on windows at module level 2021-07-06 13:26:30 -04:00
Tyler Goodlet a134bc490f Avoid mutate during interate error 2021-07-06 08:23:30 -04:00
Tyler Goodlet 0623de0b47 Expect context cancelled when we cancel 2021-07-06 08:23:30 -04:00
Tyler Goodlet 8eb889a745 Modernize streaming tests 2021-07-06 08:23:29 -04:00
Tyler Goodlet 349d82d182 Speedup the dynamic pubsub test 2021-07-06 08:23:29 -04:00
Tyler Goodlet 7c5fd8ce9f Add detailed ``@tractor.context`` cancellation/termination tests 2021-07-06 08:23:29 -04:00
Tyler Goodlet 3999849b03 Add a multi-task streaming test 2021-07-06 08:23:29 -04:00
Tyler Goodlet 5b8b7d374a Add error case 2021-07-06 08:23:29 -04:00
Tyler Goodlet e5bc07f355 Add dynamic pubsub test using new bidir stream apis 2021-07-06 08:23:29 -04:00
Tyler Goodlet 98133a984e Parametrize with async for style tests 2021-07-06 08:23:29 -04:00
Tyler Goodlet 4240efc7e3 Add basic test set 2021-07-06 08:23:29 -04:00
Tyler Goodlet 4846c6d498 Cancel scope on stream consumer completion 2021-07-06 08:23:29 -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