diff options
author | Ted Gould <ted@gould.cx> | 2010-07-12 13:57:47 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-07-12 13:57:47 -0500 |
commit | 930a79ae19c29e718b9fb49246baba58f9c32875 (patch) | |
tree | b3d4fbbcb3fb51e553dd03ed88ba608e72c66ca5 /tests/test-approver.c | |
parent | 8a0649a9f1fe4914149a86f42f5e503be8edd87f (diff) | |
download | ayatana-indicator-application-930a79ae19c29e718b9fb49246baba58f9c32875.tar.gz ayatana-indicator-application-930a79ae19c29e718b9fb49246baba58f9c32875.tar.bz2 ayatana-indicator-application-930a79ae19c29e718b9fb49246baba58f9c32875.zip |
Add a fail timeout so this test can't block.
Diffstat (limited to 'tests/test-approver.c')
-rw-r--r-- | tests/test-approver.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-approver.c b/tests/test-approver.c index 30beb30..bc25761 100644 --- a/tests/test-approver.c +++ b/tests/test-approver.c @@ -136,6 +136,14 @@ check_for_service (gpointer user_data) return TRUE; } +gboolean +fail_timeout (gpointer user_data) +{ + g_debug("Failure timeout initiated."); + g_main_loop_quit(main_loop); + return FALSE; +} + int main (int argc, char ** argv) { @@ -156,6 +164,7 @@ main (int argc, char ** argv) bus_proxy = dbus_g_proxy_new_for_name(session_bus, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); g_timeout_add(100, check_for_service, NULL); + g_timeout_add_seconds(2, fail_timeout, NULL); main_loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(main_loop); |