Skip to content

Some tests sometimes randomly fail #4996

Closed
@LoipesMas

Description

@LoipesMas

Bevy version

f969c62

What you did

Run cargo test (in crates/bevy_transform)

What went wrong

Sometimes (~10% of the time) test systems::test::correct_transforms_when_no_children or systems::test::did_propagate_command_buffer fail.

Additional information

Output:

---- systems::test::correct_transforms_when_no_children stdout ----
thread 'systems::test::correct_transforms_when_no_children' panicked at 'assertion failed: `(left == r
ight)`
  left: `1v0`,
 right: `2v0`: Malformed hierarchy. This probably means that your hierarchy has been improperly mainta
ined, or contains a cycle', crates/bevy_transform/src/systems.rs:69:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    systems::test::correct_transforms_when_no_children

Same assert fails for systems::test::did_propagate_command_buffer.
Considering it happens randomly it's probably a race-condition.

I'm on Linux, but it also happens on GitHub CI (see #4994), so I assume my system information is not relevant.

Also, during my testing it happened ~7 times for correct_transforms_when_no_children and once for systems::test::did_propagate_command_buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Build-SystemRelated to build systems or continuous integrationA-ECSEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorP-CrashA sudden unexpected crashS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions