Commit c58f308a authored by Philip Withnall's avatar Philip Withnall
Browse files

tests: Be more lenient with timing checks on asyncqueue pops



On heavily loaded CI machines it seems to be taking about 1.3s between
one `g_get_monotonic_time()` call and the next. Allow that.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <pwithnall@endlessos.org>
parent a4be8577
......@@ -193,7 +193,7 @@ test_async_queue_timed (void)
/* diff should be only a little bit more than G_USEC_PER_SEC/10, but
* we have to leave some wiggle room for heavily-loaded machines...
*/
g_assert_cmpint (diff, <, G_USEC_PER_SEC);
g_assert_cmpint (diff, <, 2 * G_USEC_PER_SEC);
start = end;
g_get_current_time (&tv);
......@@ -204,7 +204,7 @@ test_async_queue_timed (void)
end = g_get_monotonic_time ();
diff = end - start;
g_assert_cmpint (diff, >=, G_USEC_PER_SEC / 10);
g_assert_cmpint (diff, <, G_USEC_PER_SEC);
g_assert_cmpint (diff, <, 2 * G_USEC_PER_SEC);
start = end;
g_get_current_time (&tv);
......@@ -217,7 +217,7 @@ test_async_queue_timed (void)
end = g_get_monotonic_time ();
diff = end - start;
g_assert_cmpint (diff, >=, G_USEC_PER_SEC / 10);
g_assert_cmpint (diff, <, G_USEC_PER_SEC);
g_assert_cmpint (diff, <, 2 * G_USEC_PER_SEC);
g_async_queue_unref (q);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment