stateright / stateright

A model checker for implementing distributed systems.

Home Page:https://docs.rs/stateright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`smoke_test_states` fails on the master branch.

HaoYang670 opened this issue · comments

---- checker::explorer::test::smoke_test_states stdout ----
thread 'checker::explorer::test::smoke_test_states' panicked at 'assertion failed: `(left == right)`
  left: `StateView { action: Some("Id(0) → Ping(0) → Id(1)"), outcome: Some("OUT: [Send(Id(0), Pong(0))]\n\nNEXT_STATE: 1\n\nPREV_STATE: 0\n"), state: Some(ActorModelState { actor_states: [0, 1], history: (1, 2), is_timer_set: [Timers({}), Timers({})], network: UnorderedNonDuplicating({Envelope { src: Id(1), dst: Id(0), msg: Pong(0) }: 1}) }), properties: [(Always, "delta within 1", None), (Sometimes, "can reach max", None), (Eventually, "must reach max", Some("14242056848553854200/2214304369511095301")), (Eventually, "must exceed max", Some("14242056848553854200/3590395016933165332/11432146542073814434/6075559035352024258")), (Always, "#in <= #out", None), (Eventually, "#out <= #in + 1", None)], svg: Some("<svg version='1.1' baseProfile='full' width='500' height='60' viewbox='-20 -20 520 80' xmlns='http://www.w3.org/2000/svg'><defs><marker class='svg-event-shape' id='arrow' markerWidth='12' markerHeight='10' refX='12' refY='5' orient='auto'><polygon points='0 0, 12 5, 0 10' /></marker></defs><line x1='0' y1='0' x2='0' y2='60' class='svg-actor-timeline' />\n<text x='0' y='0' class='svg-actor-label'>0</text>\n<line x1='100' y1='0' x2='100' y2='60' class='svg-actor-timeline' />\n<text x='100' y='0' class='svg-actor-label'>1</text>\n<line x1='0' x2='100' y1='0' y2='30' marker-end='url(#arrow)' class='svg-event-line' />\n<text x='100' y='30' class='svg-event-label'>Ping(0)</text>\n</svg>\n") }`,
 right: `StateView { action: Some("Id(0) → Ping(0) → Id(1)"), outcome: Some("OUT: [Send(Id(0), Pong(0))]\n\nNEXT_STATE: 1\n\nPREV_STATE: 0\n"), state: Some(ActorModelState { actor_states: [0, 1], history: (1, 2), is_timer_set: [Timers({}), Timers({})], network: UnorderedNonDuplicating({Envelope { src: Id(1), dst: Id(0), msg: Pong(0) }: 1}) }), properties: [(Always, "delta within 1", None), (Sometimes, "can reach max", None), (Eventually, "must reach max", None), (Eventually, "must exceed max", None), (Always, "#in <= #out", None), (Eventually, "#out <= #in + 1", None)], svg: Some("<svg version='1.1' baseProfile='full' width='500' height='60' viewbox='-20 -20 520 80' xmlns='http://www.w3.org/2000/svg'><defs><marker class='svg-event-shape' id='arrow' markerWidth='12' markerHeight='10' refX='12' refY='5' orient='auto'><polygon points='0 0, 12 5, 0 10' /></marker></defs><line x1='0' y1='0' x2='0' y2='60' class='svg-actor-timeline' />\n<text x='0' y='0' class='svg-actor-label'>0</text>\n<line x1='100' y1='0' x2='100' y2='60' class='svg-actor-timeline' />\n<text x='100' y='0' class='svg-actor-label'>1</text>\n<line x1='0' x2='100' y1='0' y2='30' marker-end='url(#arrow)' class='svg-event-line' />\n<text x='100' y='30' class='svg-event-label'>Ping(0)</text>\n</svg>\n") }`', src/checker/explorer.rs:475:9


failures:
    checker::explorer::test::smoke_test_states

Reproduced step:

> cargo clean
> cargo update
> cargo build
> cargo test

One weird thing is that if I run cargo test --verbose, the test can pass.

The failure cannot be 100% reproduced. I run cargo test 4 times and got the failure 3 times

Yes, this is something I've noticed as well. Will carve some time to investigate. Thank you @HaoYang670.

Resolving as 54f037c should address this. Thank you again @HaoYang670!