Allow slightly too big poll duration in /socket/timed_wait test

Sometimes the poll duration in the /socket/timed_wait test is slightly
bigger than the requested 100000, causing failures like:

GLib-GIO:ERROR:socket.c:620:test_timed_wait:
    assertion failed (poll_duration < 110000): (110057 < 110000)

Adjust the test to allow some jitter in the "too high" direction.

https://bugzilla.gnome.org/show_bug.cgi?id=686458
This commit is contained in:
Antoine Jacoutot 2012-10-19 14:34:18 +02:00
parent d906f84a44
commit 475edeb2ed

View File

@ -617,7 +617,7 @@ test_timed_wait (void)
poll_duration = g_get_monotonic_time () - start_time;
g_assert_cmpint (poll_duration, >=, 98000);
g_assert_cmpint (poll_duration, <, 110000);
g_assert_cmpint (poll_duration, <, 112000);
g_socket_close (client, &error);
g_assert_no_error (error);