diff --git a/crates/thing-core/tests/intake.rs b/crates/thing-core/tests/intake.rs index f172b5c..7f9b493 100644 --- a/crates/thing-core/tests/intake.rs +++ b/crates/thing-core/tests/intake.rs @@ -225,7 +225,9 @@ fn interests_follow_what_the_held_trees_read() { rig.offer(&b1); let (one, two) = (comp_address("one"), comp_address("two")); // One subscription per address however many surfaces read it. - assert_eq!(rig.interest_calls(), vec![(true, one.clone()), (true, two.clone())]); + let held = rig.interest_calls(); + assert_eq!(held.len(), 2); + assert!(held.contains(&(true, one.clone())) && held.contains(&(true, two.clone()))); // Changes and re-applies never resubscribe what is held. rig.put(&composition("one", "1b")); @@ -235,7 +237,9 @@ fn interests_follow_what_the_held_trees_read() { // A new version that stops reading `two` lets it go; `one` is untouched. rig.offer(&surface("a", 2, vec![use_of("u1", "one")])); - assert_eq!(rig.interest_calls(), vec![(true, one.clone()), (true, two.clone()), (false, two.clone())]); + let mut expected = held.clone(); + expected.push((false, two.clone())); + assert_eq!(rig.interest_calls(), expected); // A shared address is released only when its last reader goes. rig.apply(Change::Delete(surface_address(&a1)));