makair-control-ui
makair-control-ui copied to clipboard
Add GUI proptest for any sequence of TelemetryMessage
This PR is the continuation of https://github.com/makers-for-life/makair/pull/214
Just for the record, the only failure found after many tests:
thread 'tests::test_gui_with_telemetry_messages' panicked at 'attempt to subtract with overflow', /home/ronan/.cargo/registry/src/github.com-1ecc6299db9ec823/plotters-0.2.12/src/drawing/rasterizer/polygon.rs:101:32
proptest: FileFailurePersistence::SourceParallel set, but no source file known
thread 'tests::test_gui_with_telemetry_messages' panicked at 'called `Result::unwrap()` on an `Err` value: Fail(Reason("attempt to subtract with overflow"), [
DataSnapshot(DataSnapshot { version: "", device_id: "0-0-0", systick: 1588921352859, centile: 0, pressure: 448, phase: Inhalation, subphase: Inspiration, blower_valve_position: 0, patient_valve_position: 0, blower_rpm: 0, battery_level: 0 }),
DataSnapshot(DataSnapshot { version: "", device_id: "0-0-0", systick: 1588921352859, centile: 0, pressure: 0, phase: Inhalation, subphase: Inspiration, blower_valve_position: 0, patient_valve_position: 0, blower_rpm: 0, battery_level: 0 }),
DataSnapshot(DataSnapshot { version: "", device_id: "0-0-0", systick: 1588921352859, centile: 0, pressure: 96, phase: Inhalation, subphase: Inspiration, blower_valve_position: 0, patient_valve_position: 0, blower_rpm: 0, battery_level: 0 })])', src/main.rs:150:9
@valeriansaliou now proptests run in there own long-tests feature in CI.
Hello. Sorry about not reviewing this earlier. Could this still be useful at this point? If so, can you please submit another merge that could work w/ our current code? (I'm afraid the code diverged too much since May).