Skip to content

Commit a10735e

Browse files
committed
panic if event is not found in the expected blocks
1 parent 4363f8b commit a10735e

File tree

1 file changed

+8
-0
lines changed
  • runtime/integration-tests/src/generic

1 file changed

+8
-0
lines changed

runtime/integration-tests/src/generic/env.rs

+8
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,23 @@ pub trait Env<T: Runtime>: Default {
111111
)
112112
});
113113

114+
let mut found_event = false;
114115
for i in blocks.range_for(current, slot) {
115116
self.__priv_build_block(i);
116117

117118
if let Blocks::UntilEvent { event, .. } = blocks.clone() {
118119
if self.check_event(event).is_some() {
120+
found_event = true;
119121
break;
120122
}
121123
}
122124
}
125+
126+
if let Blocks::UntilEvent { event, limit } = blocks.clone() {
127+
if !found_event {
128+
panic!("Event {event:?} was not found producing {limit} blocks");
129+
}
130+
}
123131
}
124132

125133
/// Allows to mutate the relay storage state through the closure.

0 commit comments

Comments
 (0)