Skip to content

Commit 489ef5a

Browse files
authored
test: fix a flaky test (#283)
1 parent 1ddae63 commit 489ef5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/mdns_test.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,9 +1546,12 @@ fn test_name_conflict_resolution() {
15461546
service_names.insert(info.get_fullname().to_string());
15471547

15481548
// Find and verify name conflict resolution.
1549-
15501549
if info.get_fullname().contains("(2)") {
15511550
assert_eq!(info.get_hostname(), "conflict_host-2.local.");
1551+
}
1552+
1553+
// Stop the wait if both are resolved.
1554+
if service_names.len() == 2 {
15521555
break;
15531556
}
15541557
}

0 commit comments

Comments
 (0)