From c717b8805736443afc0a84ca38211237bec132df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 2 Nov 2019 22:52:56 +0100 Subject: [PATCH] Increase test timeout tolerance on macOS. --- tests/vibe.core.net.1429.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/vibe.core.net.1429.d b/tests/vibe.core.net.1429.d index 14c7fcc..0b38bc8 100644 --- a/tests/vibe.core.net.1429.d +++ b/tests/vibe.core.net.1429.d @@ -26,8 +26,11 @@ void main() assert(false, "Timeout did not occur."); } catch (Exception e) { auto duration = MonoTime.currTime() - start; + version (OSX) enum maxtolerance = 150.msecs; + else enum maxtolerance = 50.msecs; assert(duration >= 99.msecs, "Timeout occurred too early"); - assert(duration >= 99.msecs && duration < 150.msecs, "Timeout occurred too late."); + assert(duration >= 99.msecs && duration < 100.msecs + maxtolerance, + "Timeout occurred too late."); logInfo("UDP receive timeout test was successful."); exitEventLoop(); }