Skip to content

Report execution order ambiguities in tests #3818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alice-i-cecile opened this issue Jan 31, 2022 · 0 comments
Open

Report execution order ambiguities in tests #3818

alice-i-cecile opened this issue Jan 31, 2022 · 0 comments
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Jan 31, 2022

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.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Jan 31, 2022
@alice-i-cecile alice-i-cecile moved this to Blocked in Scheduling Apr 27, 2022
@alice-i-cecile alice-i-cecile moved this from Blocked to PR needed in Scheduling Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use
Projects
Status: Needs Implementation
Development

No branches or pull requests

1 participant