Skip to content

Report execution order ambiguities in tests #3818

Open
@alice-i-cecile

Description

@alice-i-cecile

What problem does this solve or what need does it fill?

System execution order ambiguities are particularly dangerous in tests, as they lead to flakiness.

The ReportExecutionOrderAmbiguities resource however does not report its results when run inside of a test using manual App.update calls.

What solution would you like?

Create a method on both App and Stage (post-stageless, just Schedule) that fetches execution order ambiguities and stores them in an object for inspection.

Then, use dbg!(app.execution_order_ambiguities()) in your tests when ambiguous execution order is suspected.

What alternative(s) have you considered?

Allow users to forbid execution order ambiguities and panic if any (local) ambiguities are detected.

This would also be useful, but not quite as flexible for this use case.

Additional context

Any PR attempting this should be based off of #2766 #4299, which massively improves this system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    Status

    Needs Implementation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions