diff options
author | Bastien Nocera <hadess@hadess.net> | 2016-11-18 14:12:12 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2016-11-18 14:17:15 +0100 |
commit | a176b9a03d04d3f1657ffeaff51bd72a2e6ae21e (patch) | |
tree | 99e0269d21b00a52e6f185511bf00604867a4e01 | |
parent | 2802eaf147dd7c2cb6ce3a3d2a39b612b5cc35f6 (diff) | |
download | grilo-a176b9a03d04d3f1657ffeaff51bd72a2e6ae21e.tar.gz |
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
-rw-r--r-- | 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 |