forked from goodboy/tractor
a628eabb30
By re-purposing our `pexpect`-based console matching with a new `debugging/shield_hang_in_sub.py` example, this tests a few "hanging actor" conditions more formally: - that despite a hanging actor's task we can dump a `stackscope.extract()` tree on relay of `SIGUSR1`. - the actor tree will terminate despite a shielded forever-sleep by our "T-800" zombie reaper machinery activating and hard killing the underlying subprocess. Some test deats: - simulates the expect actions of a real user by manually using `os.kill()` to send both signals to the actor-tree program. - `pexpect`-matches against `log.devx()` emissions under normal `debug_mode == True` usage. - ensure we get the actual "T-800 deployed" `log.error()` msg and that the actor tree eventually terminates! Surrounding (re-org/impl/test-suite) changes: - allow disabling usage via a `maybe_enable_greenback: bool` to `open_root_actor()` but enable by def. - pretty up the actual `.devx()` content from `.devx._stackscope` including be extra pedantic about the conc-primitives for each signal event. - try to avoid double handles of `SIGUSR1` even though it seems the original (what i thought was a) problem was actually just double logging in the handler.. |_ avoid double applying the handler func via `signal.signal()`, |_ use a global to avoid double handle func calls and, |_ a `threading.RLock` around handling. - move common fixtures and helper routines from `test_debugger` to `tests/devx/conftest.py` and import them for use in both test mods. |
||
---|---|---|
.. | ||
advanced_faults | ||
debugging | ||
integration | ||
parallelism | ||
__init__.py | ||
__main__.py | ||
a_trynamic_first_scene.py | ||
actor_spawning_and_causality.py | ||
actor_spawning_and_causality_with_daemon.py | ||
asynchronous_generators.py | ||
full_fledged_streaming_service.py | ||
infected_asyncio_echo_server.py | ||
multiple_streams_one_portal.py | ||
quick_cluster.py | ||
remote_error_propagation.py | ||
rpc_bidir_streaming.py | ||
service_discovery.py |