[glib] Allow slightly too small poll duration in /socket/timed_wait test
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Allow slightly too small poll duration in /socket/timed_wait test
- Date: Tue, 26 Jun 2012 16:35:10 +0000 (UTC)
commit 72af44cb1249f02cbe56376a751e3ae6d3b39ea8
Author: Martin Pitt <martinpitt gnome org>
Date: Tue Jun 26 18:32:29 2012 +0200
Allow slightly too small poll duration in /socket/timed_wait test
Sometimes the poll duration in the /socket/timed_wait test is slightly lower
than the requested 100000, causing failures like
ERROR:/build/buildd/glib2.0-2.33.2/./gio/tests/socket.c:619:test_timed_wait:
assertion failed (poll_duration > = 100000): (99240 >= 100000)
FAIL
Adjust the test to also allow some jitter in the "too small" direction, similar
to the already existing span for "slightly too large".
https://bugzilla.gnome.org/show_bug.cgi?id=678881
gio/tests/socket.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index 7404bba..0a61c9f 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -616,7 +616,7 @@ test_timed_wait (void)
g_clear_error (&error);
poll_duration = g_get_monotonic_time () - start_time;
- g_assert_cmpint (poll_duration, >=, 100000);
+ g_assert_cmpint (poll_duration, >=, 98000);
g_assert_cmpint (poll_duration, <, 110000);
g_socket_close (client, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]