Skip to content

Commit

Permalink
dev-test: enhance test case for ipv4 only auto addr (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
keepsimple1 authored Oct 12, 2024
1 parent f902cf2 commit 429ecde
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/mdns_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,8 @@ fn service_with_ipv4_only() {
let timeout = Duration::from_secs(2);
let mut resolved = false;

// run till the timeout and collect the resolved addresses
// from all enabled interfaces.
while let Ok(event) = browse_chan.recv_timeout(timeout) {
match event {
ServiceEvent::ServiceResolved(info) => {
Expand All @@ -611,7 +613,7 @@ fn service_with_ipv4_only() {
for addr in info.get_addresses().iter() {
assert!(addr.is_ipv4());
}
break;
// We don't break here, as there could be more addresses coming.
}
e => {
println!("Received event {:?}", e);
Expand Down

0 comments on commit 429ecde

Please sign in to comment.