[grilo] tests: really fix common test failure in GrlNet
- From: Victor Toso <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] tests: really fix common test failure in GrlNet
- Date: Thu, 30 Aug 2018 07:48:24 +0000 (UTC)
commit 19126d7cf8c9b37bb5f35c63dd2b32e7e7ea0e25
Author: Victor Toso <me victortoso com>
Date: Wed Aug 29 14:50:18 2018 +0200
tests: really fix common test failure in GrlNet
Based on intention of commit a176b9a03d04d3f1, we should be going up
to 1s of threshold to avoid failure such as:
ERROR:../tests/lib-net.c:114:test_net_wc_throttling_cb: assertion
failed (received_time >= op->expected_time):
(118905943655 >= 118905946568)
This has been tested over 500 times, with different overloads in the
machine, no failure. It still should be able to find valid regressions
on the code as the most important one would be stress test and
big-delay, the later having a 5 seconds timeout to guarantee that the
network request has not been made.
Related: https://bugzilla.gnome.org/show_bug.cgi?id=774578
Signed-off-by: Victor Toso <victortoso gnome org>
tests/lib-net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/tests/lib-net.c b/tests/lib-net.c
index 565847f..61858b5 100644
--- a/tests/lib-net.c
+++ b/tests/lib-net.c
@@ -138,7 +138,7 @@ throttling_operation_new (Fixture *f, guint delay_in_sec)
/* Some THRESOLD seems necessary as the test time happens before the actual
* GrlNetWc computation. This test is more about throttling working than
* precision. */
- op->expected_time -= THRESHOLD;
+ op->expected_time -= G_USEC_PER_SEC * THRESHOLD;
id++;
f->num_operations++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]