Add health_of_with_memberships test
This will replace the health_of test, which requires recursive locking
@@ -955,6 +955,16 @@ mod tests {
.ok();
}
+ #[test]
+ fn health_of_with_memberships() {
+ let ml = populated_member_list(1);
+ ml.with_memberships(|Membership { member: _, health }| {
+ assert_eq!(health, Health::Alive);
+ Ok(0)
+ })
+ .ok();
+ }
+
#[test]
fn pingreq_targets() {
let ml = populated_member_list(10);
