Skip to content

flaky unit test: child_alarm_with_shuffled_entity_registration #4093

@reubenmiller

Description

@reubenmiller

Describe the bug

A PR check run found a flaky unit test regarding the ordering of child messages. Below shows the error output:

FAIL [   8.468s] ( 502/2497) c8y_mapper_ext shuffled_tests::child_alarm_with_shuffled_entity_registration
  stdout ───

    running 1 test
    test shuffled_tests::child_alarm_with_shuffled_entity_registration ... FAILED

    failures:

    failures:
        shuffled_tests::child_alarm_with_shuffled_entity_registration

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 296 filtered out; finished in 8.46s
    
  stderr ───

    thread 'shuffled_tests::child_alarm_with_shuffled_entity_registration' (94207) panicked at crates/extensions/tedge_mqtt_ext/src/test_helpers.rs:50:5:
    Payload assertion failed.
     Actual: "303,temperature_high,Temperature high,2026-04-01T06:32:50.496492327Z" 
    Expected message with topic: c8y/s/us/test-device:device:external_sensor, payload: 303,temperature_high,Still high
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    proptest: Saving this and future failures in /home/runner/work/thin-edge.io/thin-edge.io/crates/extensions/c8y_mapper_ext/proptest-regressions/shuffled_tests.txt
    proptest: If this test was run on a CI system, you may wish to add the following line to your copy of the file.
    cc edb57ff902f26a1738fdceaf0d22fe7d8d4e910e1da4054944e73bd1a0867b58

    thread 'shuffled_tests::child_alarm_with_shuffled_entity_registration' (94207) panicked at crates/extensions/c8y_mapper_ext/src/shuffled_tests.rs:349:1:
    Test failed: Payload assertion failed.
     Actual: "303,temperature_high,Temperature high,2026-04-01T06:32:50.496492327Z" 
    Expected message with topic: c8y/s/us/test-device:device:external_sensor, payload: 303,temperature_high,Still high.
    minimal failing input: ChildAlarmWithShuffledEntityRegistrationArgs = ChildAlarmWithShuffledEntityRegistrationArgs {
        field0: 15668371114638989990,
    }

To Reproduce

Expected behavior

Screenshots

Environment (please complete the following information):

  • OS [incl. version]: any
  • Hardware [incl. revision]: any
  • System-Architecture [e.g. result of "uname -a"]: any
  • thin-edge.io version [e.g. 0.1.0]: >= 1.7.1 on a PR

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingflaky testLabel given to flaky or otherwise faulty tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions