unchanged_frames_do_not_replay_the_previous_transition in kobo-sim fails about a third of the time under a plain cargo test, and never under cargo test -- --test-threads=1. It reproduces on main, so it is not caused by any pending branch.
The cause looks to be the system typesetter, which kobo-text installs lazily into a process-global OnceLock. Tests running in parallel share that global, so whether the install lands between the test's two frame() calls decides whether the second frame is judged unchanged. The test is asserting on a process-wide side effect it does not own.
Reproducing it:
cargo test -p kobo-sim # fails roughly one run in three
cargo test -p kobo-sim -- --test-threads=1 # passes every time
Happy to send a fix if you have a preference for the shape. The obvious ones are having the test install the typesetter itself before the first frame, or giving the simulator an explicit typesetter rather than reading the global.
unchanged_frames_do_not_replay_the_previous_transitioninkobo-simfails about a third of the time under a plaincargo test, and never undercargo test -- --test-threads=1. It reproduces onmain, so it is not caused by any pending branch.The cause looks to be the system typesetter, which
kobo-textinstalls lazily into a process-globalOnceLock. Tests running in parallel share that global, so whether the install lands between the test's twoframe()calls decides whether the second frame is judged unchanged. The test is asserting on a process-wide side effect it does not own.Reproducing it:
Happy to send a fix if you have a preference for the shape. The obvious ones are having the test install the typesetter itself before the first frame, or giving the simulator an explicit typesetter rather than reading the global.