unittest for bind two consecutive ports (#23008)
* minor fix of comments in fork-selection tests * fix doc link * add unittest for bind_two_consecutive_in_range
This commit is contained in:
@ -790,4 +790,14 @@ mod tests {
|
||||
3,
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_bind_two_consecutive_in_range() {
|
||||
solana_logger::setup();
|
||||
let ip_addr = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0));
|
||||
if let Ok(((port1, _), (port2, _))) = bind_two_consecutive_in_range(ip_addr, (1024, 65535))
|
||||
{
|
||||
assert!(port2 == port1 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user