Skip to content

fake daemons that crash for testing purposes #100

Description

@untzag

In auto-rxn, there is a special "fallback" system which is meant to gracefully return all hardware to reasonable positions in the case a reading hits specified limits or there is some other error. We recently discovered that this behavior does NOT work as intended if a daemon crashes [1].

I would like to add tests to auto-rxn to ensure correct behavior when daemons crash. I need crash dummy fake daemons. I can think of a few ways to do this:

  1. I can add new fake daemons or modify existing daemons to optionally crash. Probably would end up having a config option "crash after X seconds" or "crash after X calls to get_position".
  2. I can modify our existing testing decorators [2]. This way any daemon could be set up to crash after X seconds for testing purposes.
  3. I can write my own special purpose crash dummy daemon and run it via run_daemon_from_file. This has the advantage of not needing to modify this repo to enable my tests.

Which method is preferred? Do others have testing needs that are similar?

@ddkohler @ksunden

[1] uw-madison-chem-shops/auto_rxn#63
[2] https://github.com/yaq-project/yaq-python/blob/main/yaqd-core/yaqd_core/testing/_run_daemon.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions