Merge lp:~indicator-applet-developers/hud/g_action_map_lookup_action into lp:hud/13.10

Proposed by Antti Kaijanmäki
Status: Merged
Approved by: Pete Woods
Approved revision: 316
Merged at revision: 315
Proposed branch: lp:~indicator-applet-developers/hud/g_action_map_lookup_action
Merge into: lp:hud/13.10
Diff against target: 39 lines (+9/-8)
1 file modified
tests/test-watchdog.c (+9/-8)
To merge this branch: bzr merge lp:~indicator-applet-developers/hud/g_action_map_lookup_action
Reviewer Review Type Date Requested Status
Pete Woods (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+181533@code.launchpad.net

Commit message

Adjust watchdog test limits to get rid of random timing failures.

Description of the change

adjust watchdog test limits to get rid of random timing failures.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
316. By Antti Kaijanmäki

test-watchdog: increase the final_fail timeout to 15s.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Pete Woods (pete-woods) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/test-watchdog.c'
--- tests/test-watchdog.c 2013-04-26 16:22:01 +0000
+++ tests/test-watchdog.c 2013-08-22 12:12:46 +0000
@@ -76,10 +76,10 @@
76}76}
7777
78static gboolean78static gboolean
79hit_one_sec (gpointer pboolean)79hit_two_sec (gpointer pboolean)
80{80{
81 gboolean * onesec = (gboolean *)pboolean;81 gboolean * twosec = (gboolean *)pboolean;
82 *onesec = TRUE;82 *twosec = TRUE;
83 return FALSE;83 return FALSE;
84}84}
8585
@@ -102,17 +102,18 @@
102 g_clear_object(&doggie);102 g_clear_object(&doggie);
103103
104 /* Test a single ping */104 /* Test a single ping */
105 gboolean one_sec_hit = FALSE;105 g_setenv("HUD_SERVICE_TIMEOUT", "3", TRUE);
106 gboolean two_sec_hit = FALSE;
106 doggie = hud_watchdog_new(loop);107 doggie = hud_watchdog_new(loop);
107108
108 final = g_timeout_add_seconds(3, final_fail, loop);109 final = g_timeout_add_seconds(15, final_fail, loop);
109 g_timeout_add(500, ping_watchdog, doggie);110 g_timeout_add(1000, ping_watchdog, doggie);
110 g_timeout_add(1000, hit_one_sec, &one_sec_hit);111 g_timeout_add(2000, hit_two_sec, &two_sec_hit);
111112
112 g_main_loop_run(loop);113 g_main_loop_run(loop);
113 g_source_remove(final);114 g_source_remove(final);
114115
115 g_assert(one_sec_hit);116 g_assert(two_sec_hit);
116 g_clear_object(&doggie);117 g_clear_object(&doggie);
117118
118119

Subscribers

People subscribed via source and target branches

to all changes: