Commit Graph

70 Commits (cf732835869ad837bf16f8af72403456833f1e05)

Author SHA1 Message Date
Tyler Goodlet 915bf17a9a Add process tree depth control to nested multierror test
Another step toward having a complete test for #89.
Subactor breadth still seems to cause the most havoc and is why I've
kept that value to just 2 for now.
2019-11-25 12:05:15 -05:00
Tyler Goodlet 2d4b6de4f4 Spawn even less suba-actors in Windows CI
Seems like we've probably got some greater limitations
with Windows and "nested" spawned sub-processes...
2019-11-22 21:23:25 -05:00
Tyler Goodlet 97df927714 Run first example test under both start methods 2019-10-30 00:31:28 -04:00
Tyler Goodlet 6d9ac53bd5 Add nested multierror testing
Add a test to verify that `trio.MultiError`s are properly propagated up
a simple actor nursery tree. We don't have any exception marshalling
between processes (yet) so we can't validate much more then a simple
2-depth tree. This satisfies the final bullet in #43.

Note I've limited the number of subactors per layer to around 5 since
any more then this seems to break the `multiprocessing` forkserver;
zombie subprocesses seem to be blocking teardown somehow...

Also add a single depth fast fail test just to verify that it's the
nested spawning that triggers this forkserver bug.
2019-10-30 00:30:40 -04:00
Tyler Goodlet d406383cd3 Add a preliminary nested subactor `MultiError` test
This exemplifies the undefined behaviour in #88 and begins to test for
the last bullet in #43.
2019-10-26 15:04:13 -04:00
Tyler Goodlet 6dbb3f7ae6 Extend cancellation tests
In an effort towards #43. This completes the first major bullet's worth of tests
described in that issue.
2019-10-26 09:55:07 -04:00
Tyler Goodlet 6ec9752f46 Slight slowdown on windows / py3.8? 2019-10-16 11:02:18 -04:00
Tyler Goodlet 7e8b7091cb Check for proper SIGINT return code
They finally got https://bugs.python.org/issue1054041 in Python 3.8
2019-10-15 23:22:48 -04:00
Tyler Goodlet 5760bb1b7c Adjust test timeout/sync handling for windows 2019-03-31 15:34:44 -04:00
Tyler Goodlet b965d20cba Add stream func tests 2019-03-29 19:10:56 -04:00
Tyler Goodlet faa1f373b5 Add subactor loglevel propagation test
Can't seem to get the `capfd` fixture to capture subprocess logging to
stderr even though the console report shows the log message as being
captured? Skipping the test on the forkserver method for now.
2019-03-23 23:27:32 -04:00
Christian López Barrón 5fc51fd745 multi_program signal for windows missing SIGKILL, SIGINT 2019-03-13 21:32:45 +11:00
Christian López Barrón 2138d55a60 increased trio.sleep time for other actors to spawn 2019-03-13 21:32:45 +11:00
Christian López Barrón efffca371a pytest_generate_tests remove `fork` only if it's in list 2019-03-13 21:32:45 +11:00
Tyler Goodlet 9a780485dc Use "clean channel shutdown" in streaming example
Resolves #65
2019-03-10 22:08:50 -04:00
Tyler Goodlet b70f4eafcb Flip tests to use `start_method` kwarg 2019-03-08 20:06:16 -05:00
Tyler Goodlet d6ca722bcc Sprinkle `spawn_method` fixture throughout tests 2019-03-06 00:37:02 -05:00
Tyler Goodlet 483ae42a46 Add a `spawn_method` dynamic fixture 2019-03-06 00:36:37 -05:00
Tyler Goodlet 78ddd33e3a Move to `trio.CancelScope` 2019-02-16 14:25:06 -05:00
Tyler Goodlet 85a0700716 Add back line that breaks with async gens 2019-02-15 22:10:55 -05:00
Tyler Goodlet 51f082fff7 Use mem chan in streaming tests 2019-02-15 17:10:57 -05:00
Tyler Goodlet 41c202db68 Add a multi-task subscriber test
In combination with `.aclose()`-ing the async gen instance returned from
`Portal.run()` this demonstrates the python bug:
https://bugs.python.org/issue32526

I've commented out the line that triggers the bug for now since this
case provides motivation for adding our own `trio.abc.ReceiveMemoryChannel`
implementation to be used instead of async gens directly (returned from
`Portal.run()`) since the latter is **not** task safe.
2019-02-15 17:04:41 -05:00
Tyler Goodlet b0b35284f4 Add call/decorate time type checking tests 2019-01-25 00:13:13 -05:00
Tyler Goodlet 2b1e8773bb Verify subs topics at each step 2019-01-23 22:35:04 -05:00
Tyler Goodlet 36ee6695fb Add initial pubsub test 2019-01-21 12:31:03 -05:00
Tyler Goodlet d2f0537850 Add tests for import-time failures 2019-01-12 17:56:39 -05:00
Tyler Goodlet fe4a39550d Add remote module error handling tests 2019-01-01 16:12:34 -05:00
Tyler Goodlet 47b531a43a Add test to verify remote task cancellation 2018-12-10 23:13:58 -05:00
Tyler Goodlet 512a2f25a2 Expose `tractor_test` in the same way as `trio` 2018-11-26 11:26:04 -05:00
Tyler Goodlet 0879150399 Move `tractor_test` to new module 2018-11-26 11:20:53 -05:00
Tyler Goodlet 23c7519fec Jeeze 3.7.1 got even faster? 2018-11-22 14:25:31 -05:00
Tyler Goodlet a482681f9c Leverage `pytest.raises()` better; fix a bunch of docs 2018-11-22 11:43:04 -05:00
Tyler Goodlet 3e74cc6f11 Verify nested boxed errors 2018-11-19 16:53:21 -05:00
Tyler Goodlet 7a2b7d9d14 Delay tweak for py3.7.1 2018-11-19 14:17:01 -05:00
Tyler Goodlet 9102c48810 Add multierror cancellation tests 2018-11-19 14:16:42 -05:00
Tyler Goodlet aa32f42715 Avoid hanging multi-prog test when SIGINT fails 2018-11-09 01:36:45 -05:00
Tyler Goodlet 034146f2b1 Verify arbiter self registration 2018-09-21 00:32:23 -04:00
Tyler Goodlet 7dd91d0684 Wait longer for arbiter-daemon to spawn on py3.6 2018-09-17 09:17:11 -04:00
Tyler Goodlet 827a6c6014 Make `rpc_modules` a positional arg to `tractor.run_daemon()` 2018-09-10 22:31:23 -04:00
Tyler Goodlet 037c4c3797 Comment tweak 2018-09-10 15:28:19 -04:00
Tyler Goodlet d12136d44d Add some mult-program tests
Run the arbiter-actor in a separate program and do some basic tests to
make sure everything works - particularly, registration and
cancellation.
2018-09-08 09:44:29 -04:00
Tyler Goodlet 0ca668453c Running without a main func is a type error 2018-09-05 18:13:23 -04:00
Tyler Goodlet a998a5e415 Forgot to remove spawn tests from test_local.py 2018-09-04 22:17:02 -04:00
Tyler Goodlet c2457f7cce Move basic spawning tests to separate module 2018-09-02 22:07:32 -04:00
Tyler Goodlet 18e101d38e Move streaming tests into separate module 2018-09-02 21:58:42 -04:00
Tyler Goodlet 51076ebb5c Break cancellation tests into new module 2018-09-02 11:51:58 -04:00
Tyler Goodlet 3dcf16c43d Min cancel delay >= 0 2018-08-31 20:38:34 -04:00
Tyler Goodlet a64c2a70bd Base cancel delays on speed of a non-cancelled run 2018-08-19 16:08:02 -04:00
Tyler Goodlet 8c110c79fb A teensy more lax on the speed test 2018-08-17 16:55:00 -04:00
Tyler Goodlet ea60a3dff9 Test the `wait_for_actor()` api 2018-08-13 00:06:22 -04:00