Skip to content

Commit 70cf856

Browse files
committed
Add test assertions
Signed-off-by: Michael X. Grey <[email protected]>
1 parent 3dbd37e commit 70cf856

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rclrs/src/executor.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ mod tests {
500500
let _node = executor.create_node(&format!("test_timeout_{}", line!())).unwrap();
501501

502502
for _ in 0..10 {
503-
executor.spin(SpinOptions::default().timeout(Duration::from_millis(1)));
503+
let r = executor.spin(SpinOptions::default().timeout(Duration::from_millis(1)));
504+
assert_eq!(r.len(), 1);
505+
assert!(matches!(r[0], RclrsError::RclError { code: RclReturnCode::Timeout, .. }));
504506
}
505507
}
506508
}

0 commit comments

Comments
 (0)