forked from goodboy/tractor
1
0
Fork 0
tractor/tests
Tyler Goodlet dd168184c3 Add a open-ctx-with-self test
Found exactly why trying this won't work when playing around with
opening workspaces in `modden` using a `Portal.open_context()` back to
the 'bigd' root actor: the RPC machinery only registers one entry in
`Actor._contexts` which will get overwritten by each task's side and
then experience race-based IPC msging errors (eg. rxing `{'started': _}`
on the callee side..). Instead make opening a ctx back to the self-actor
a runtime error describing it as an invalid op.

To match:
- add a new test `test_ctx_with_self_actor()` to the context semantics
  suite.
- tried out adding a new `side: str` to the `Actor.get_context()` (and
  callers) but ran into not being able to determine the value from in
  `._push_result()` where it's needed to figure out which side to push
  to.. So, just leaving the commented arg (passing) in the runtime core
  for now in case we can come back to trying to make it work, tho i'm
  thinking it's not the right hack anyway XD
2024-03-11 10:29:42 -04:00
..
conftest.py Update ctx test suites to stricter semantics 2024-03-07 21:26:57 -05:00
test_2way.py Move context-streaming operational tests into one mod 2021-12-06 16:45:44 -05:00
test_advanced_faults.py Add a simplified zombie lord specific process reaping test 2023-01-29 14:55:02 -05:00
test_advanced_streaming.py Flip rpc tests over to use `ExceptionGroup` on new `trio` 2024-03-05 10:34:32 -05:00
test_cancellation.py Make `@context`-cancelled tests more pedantic 2024-02-28 19:25:27 -05:00
test_child_manages_service_nursery.py Flip rpc tests over to use `ExceptionGroup` on new `trio` 2024-03-05 10:34:32 -05:00
test_clustering.py Fix cluster test to use `allow_overruns` 2023-05-15 10:00:45 -04:00
test_context_stream_semantics.py Add a open-ctx-with-self test 2024-03-11 10:29:42 -04:00
test_debugger.py Mk debugger tests work for arbitrary pre-REPL format 2024-03-05 12:22:04 -05:00
test_discovery.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_docs_examples.py Get remaining suites passing.. 2023-10-19 11:51:47 -04:00
test_infected_asyncio.py Adjust `asyncio` test for stricter ctx-self-cancels 2024-03-07 21:33:07 -05:00
test_inter_peer_cancellation.py Add a `._state._runtime_vars['_registry_addrs']` 2024-03-08 15:34:20 -05:00
test_legacy_one_way_streaming.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_local.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_multi_program.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_pubsub.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_resource_cache.py Bump timeout on resource cache test a bitty bit. 2024-01-03 22:27:05 -05:00
test_rpc.py Flip rpc tests over to use `ExceptionGroup` on new `trio` 2024-03-05 10:34:32 -05:00
test_runtime.py Tolerate eg in runtime test teardown 2022-10-14 19:42:23 -04:00
test_shm.py Pass `str` dtype for `use_str` case 2023-06-15 12:20:20 -04:00
test_spawning.py Get remaining suites passing.. 2023-10-19 11:51:47 -04:00
test_task_broadcasting.py Port all tests to new `reg_addr` fixture name 2023-10-18 15:39:20 -04:00
test_trioisms.py Add a new "trioisms" test mod for tracking `trio` wishlist behaviour 2022-04-12 13:05:56 -04:00