From bddf357baf44b93df36e7a1a128717462dff6615 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sun, 29 Sep 2013 10:19:43 +0200 Subject: [PATCH] test: relax timing assumption of loop_stop The loop_stop test makes an implicit assumption about the triggering timing of a repeating trigger, which may not hold true on slower or virtualized machines, thus failing the test as shown at [0] and discussed at [1]. This commit relaxes the assumption, without mandating the exact number of runs. [0] http://ur1.ca/fr5bw [1] https://groups.google.com/d/msg/libuv/5-fNIC7hIAo/yqznDmwHDAIJ Signed-off-by: Luca Bruno --- test/test-loop-stop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-loop-stop.c b/test/test-loop-stop.c index db52a094..c519644e 100644 --- a/test/test-loop-stop.c +++ b/test/test-loop-stop.c @@ -62,7 +62,7 @@ TEST_IMPL(loop_stop) { r = uv_run(uv_default_loop(), UV_RUN_NOWAIT); ASSERT(r != 0); - ASSERT(prepare_called == 3); + ASSERT(prepare_called > 1); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); ASSERT(r == 0);