Allow slightly too big poll duration in /socket/timed_wait test
authorAntoine Jacoutot <ajacoutot@gnome.org>
Fri, 19 Oct 2012 12:34:18 +0000 (14:34 +0200)
committerAntoine Jacoutot <ajacoutot@gnome.org>
Fri, 19 Oct 2012 12:34:18 +0000 (14:34 +0200)
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

gio/tests/socket.c

index f142296..e96e792 100644 (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);