[grilo] tests: Fix common test failures in GrlNet tests
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] tests: Fix common test failures in GrlNet tests
- Date: Fri, 18 Nov 2016 13:19:15 +0000 (UTC)
commit a176b9a03d04d3f1657ffeaff51bd72a2e6ae21e
Author: Bastien Nocera <hadess hadess net>
Date: Fri Nov 18 14:12:12 2016 +0100
tests: Fix common test failures in GrlNet tests
The small-delay test fails fairly often, about 20% of the time for a 100
runs on a non-loaded machine.
We're lucky it doesn't happen more often, as g_timeout_add_seconds() as
used by grl-net-wc.c will ultimately use g_timeout_set_expiration()
which might round up timeouts to the above second:
"
/* We want the microseconds part of the timeout to land on the
* 'timer_perturb' mark, but we need to make sure we don't try to
* set the timeout in the past. We do this by ensuring that we
* always only *increase* the expiration time by adding a full
* second in the case that the microsecond portion decreases.
*/
"
Bump the threshold to a full second, and verify by raising the delay
in the grl_net_wc_set_throttling() call.
https://bugzilla.gnome.org/show_bug.cgi?id=774578
tests/lib-net.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/lib-net.c b/tests/lib-net.c
index 5830729..4fa16b7 100644
--- a/tests/lib-net.c
+++ b/tests/lib-net.c
@@ -44,7 +44,7 @@ typedef struct {
#define DELAY 2
#define BIG_DELAY 15 /* Big enough for a timeout */
-#define THRESHOLD (G_USEC_PER_SEC / 10) /* 0.1 second */
+#define THRESHOLD 1 /* 1 second, see https://bugzilla.gnome.org/show_bug.cgi?id=774578 */
#define NUM_STRESS_TEST 100
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]