-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I caught this while testing a component so I'm not sure whether it happens in "runtime" as well. The component code is:
void Task::updateHook() {
if (!doStuff()) { // <- may set an "emergency" internal state
throw myException();
}
}
void Task::stopHook() {
if (hasEmergency()) {
exception(EMERGENCY);
}
}Test code:
expect_execution { send_stuff_to_task }
.to { emit task.emergency_state }The behavior is not deterministic, sometimes it passes, sometimes it doesn't. If I try to catch exception_state rather than emergency_state then it passes consistently. Asserting task.orogen_state is also not deterministic, it varies between :EXCEPTION and :EMERGENCY
Metadata
Metadata
Assignees
Labels
No labels