Skip to content

If a worker exits with a non-zero status code pytest-xdist doesn't report failure #1278

@orlp

Description

@orlp

We have a mechanic in Polars to install a timeout in a second thread which when triggered exits the process as hanging. We need this because for some bugs the entire process can hang in a Rust function.

This thus calls exit(1) directly, without invoking Python exceptions or sys.exit or anything of the sort. We have no alternative to this, we are unable to return to Python.

I'd like it if pytest-xdist would check the exit code of workers, and if it exited with a non-zero exit code it is treated as a crash, restarting said worker or if no further restarts are allowed, failing that test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions