Skip to content

Commit 6b10cec

Browse files
committed
fix mirage test entries_expire for macos
1 parent 7017bec commit 6b10cec

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/mirage/tests.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,10 @@ let entries_expire () =
358358
(* Wait for cache entry to expire *)
359359
(* Entry becomes Stale after refresh (40 ticks * 2ms = 80ms) *)
360360
(* Stale entry is removed after timeout (800 ticks * 2ms = 1600ms) from initial creation *)
361-
Mirage_sleep.ns (Duration.of_sec 5) >>= fun () ->
361+
let delay = if os_linux_bsd () then 5 else 20 in
362+
Mirage_sleep.ns (Duration.of_sec delay) >>= fun () ->
362363
(* Querying now should generate an ARP request since entry should be removed *)
363-
timeout ~time:2000 (not_in_cache ~listen:speak.netif expected_arp_query listen.arp first_ip)
364+
timeout ~time:1000 (not_in_cache ~listen:speak.netif expected_arp_query listen.arp first_ip)
364365

365366
(* RFC isn't strict on how many times to try, so we'll just say any number
366367
greater than 1 is fine *)

0 commit comments

Comments
 (0)