Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crates/core/src/runtime/faults/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,16 @@ fn clear_fault_emits_fault_cleared_event() {
clear_fault(&db, &id, &app("myapp")).expect("clear");

// Drain again looking for our FaultCleared, skipping any interleaved
// events from other parallel tests.
// events from other parallel tests. The id guard is load-bearing: the
// sender is global, several sibling tests clear faults of their own, and
// without it the first FaultCleared from any of them is asserted against
// this test's id.
let mut found = false;
loop {
match rx.try_recv() {
Ok(seedling_protocol::events::OiEvent::FaultCleared {
id: eid, app, kind, ..
}) => {
assert_eq!(eid, id);
}) if eid == id => {
assert_eq!(app, "myapp");
assert_eq!(kind, "script_error");
found = true;
Expand Down