Commit Graph

169 Commits (44d798820479f0da0a609cfe2d175b01be553d6f)

Author SHA1 Message Date
Tyler Goodlet 2b4cf59ee1 Drop sleep 2021-05-07 11:21:40 -04:00
Tyler Goodlet 5ca963148e Disable leftover debug mode 2021-05-07 11:21:40 -04:00
Tyler Goodlet 4798d3b5db Drop lingering rpc_module_paths refs 2021-05-07 11:21:40 -04:00
Tyler Goodlet 247483ee93 Drop run and rpc_module_paths from streaming tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet 9e64161538 Drop run and rpc_module_paths from rpc tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet 3bddf9a94b Drop run and rpc_module_paths from spawning tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet 1eedd463cb Drop run and rpc_module_paths from pubsub tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet b46e60ab9d Drop run from multi prog tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet cb527c2562 Mostly drop run from local tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet 1584c547cd Drop run and rpc_module_paths from discovery tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet 2efd8ed167 Drop run and rpc_module_paths from cancel tests 2021-05-07 11:21:40 -04:00
Tyler Goodlet b1f657e246 De-compact async with tuple on 3.8-
Turns out can't use the nicer syntax before python 3.9 (even though it
doesn't seem documented anywhere?).

Relates to #207
2021-04-28 16:35:15 -04:00
Tyler Goodlet 2498a4963b Update all tests to new streaming API 2021-04-28 12:23:14 -04:00
Tyler Goodlet 1f1619c730 Convert all test suite sync funcs 2021-04-27 12:08:30 -04:00
Tyler Goodlet 47565cfbf3 Use root as default name from `tractor.run()` 2021-02-25 08:51:28 -05: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 a93321e48e Don't run stdlib example as part of test set 2021-02-21 15:41:21 -05:00
Tyler Goodlet 07653bc02e Run parallel examples 2021-02-21 14:08:23 -05:00
Tyler Goodlet 59421d9f3a Fix some borked tests 2021-01-08 20:55:11 -05:00
Tyler Goodlet 5127effd88 Drop warning level logging assert(s) 2020-12-26 15:45:55 -05:00
Tyler Goodlet 4bf9b27f57 Drop all .statespace refs; it was a silly idea 2020-12-22 19:33:16 -05:00
Tyler Goodlet 0eba5f4708 Port remaining tests to pass func refs 2020-12-22 10:39:47 -05:00
Tyler Goodlet 493f2efb50 Port tests to `Portal.run_from_ns()` 2020-12-22 10:39:47 -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 201771a521 'Fix mypy, change interal type name to `ReceiveStream`, settle on `.shield()`' 2020-12-17 12:01:49 -05:00
Tyler Goodlet 15ead6b561 Add a way to shield a stream's underlying channel
Add a ``tractor._portal.StreamReceiveChannel.shield_channel()`` context
manager which allows for avoiding the closing of an IPC stream's
underlying channel for the purposes of task re-spawning. Sometimes you
might want to cancel a task consuming a stream but not tear down the IPC
between actors (the default). A common use can might be where the task's
"setup" work might need to be redone but you want to keep the
established portal / channel in tact despite the task restart.

Includes a test.
2020-12-16 21:42:28 -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 1b6ee2ecf6 Skip sync sleep test on windows 2020-10-13 15:26:46 -04:00
Tyler Goodlet 15edcc622d Skip it on windows too 2020-10-13 15:13:46 -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
Tyler Goodlet a49deb46f1 Revert "Make tests a package (for relative imports)"
This reverts commit 1710b642a5.
2020-10-13 14:42:16 -04:00
Tyler Goodlet 666966097a Revert "Change to relative conftest.py imports"
This reverts commit 2b53c74b1c.
2020-10-13 14:42:02 -04:00
Tyler Goodlet ba52de79e1 Skip quad ex on local mp tests as well 2020-10-13 14:20:19 -04:00
Tyler Goodlet 24ef919334 Skip sync sleep test on mp backend 2020-10-13 14:16:20 -04:00
Tyler Goodlet 1710b642a5 Make tests a package (for relative imports) 2020-10-13 10:50:21 -04:00
Tyler Goodlet a88a6ba7a3 Add pattern matching to test 2020-10-13 00:36:34 -04:00
Tyler Goodlet 0e344eead8 Add a "cancel arrives during a sync sleep in child" test
This appears to demonstrate the same bug found in #156. It looks like
cancelling a subactor with a child, while that child is running sync code,
can result in the child never getting cancelled due to some strange
condition where the internal nurseries aren't being torn down as
expected when a `trio.Cancelled` is raised.
2020-10-12 23:25:22 -04:00
Tyler Goodlet acb4cb0b2b Add test showing issue with child in tty lock when cancelled 2020-10-07 06:08:31 -04:00
Tyler Goodlet abf8bb2813 Add a deep nested error propagation test 2020-10-06 09:21:53 -04:00
Tyler Goodlet 2b53c74b1c Change to relative conftest.py imports 2020-10-05 11:58:58 -04:00
Tyler Goodlet 371025947a Add a multi-subactor test where the root errors 2020-10-05 11:58:58 -04:00
Tyler Goodlet 31c1a32d58 Add re-entrant root breakpoint test; demonstrates a bug.. 2020-10-05 11:58:58 -04:00