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 <lucab@debian.org>
This commit is contained in:
Luca Bruno 2013-09-29 10:19:43 +02:00 committed by Ben Noordhuis
parent 6462eaf4dc
commit bddf357baf

View File

@ -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);