← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~ted/indicator-application/hudson-is--s-l-o-w into lp:indicator-application

 

Ted Gould has proposed merging lp:~ted/indicator-application/hudson-is--s-l-o-w into lp:indicator-application.

Requested reviews:
  Indicator Applet Developers (indicator-applet-developers)


Using the new libindicator change to add a configurable timeout through an environment variable.  This way hopefully the service will be usable before timing out on Hudson.
-- 
https://code.launchpad.net/~ted/indicator-application/hudson-is--s-l-o-w/+merge/29737
Your team ayatana-commits is subscribed to branch lp:indicator-application.
=== modified file '.bzrignore'
--- .bzrignore	2010-07-09 21:47:45 +0000
+++ .bzrignore	2010-07-12 19:07:42 +0000
@@ -110,3 +110,4 @@
 src/notification-approver-client.h
 src/notification-approver-server.h
 tests/test-approver
+tests/test-approver-tester

=== modified file 'tests/Makefile.am'
--- tests/Makefile.am	2010-07-10 02:35:45 +0000
+++ tests/Makefile.am	2010-07-12 19:07:42 +0000
@@ -118,6 +118,7 @@
 
 test-approver-tester: test-approver Makefile.am
 	@echo "#!/bin/bash" > $@
+	@echo export INDICATOR_SERVICE_SHUTDOWN_TIMEOUT=1000 >> $@
 	@echo . $(srcdir)/run-xvfb.sh >> $@
 	@echo $(DBUS_RUNNER) --task $(builddir)/test-approver --task-name Approver --task $(top_builddir)/src/indicator-application-service --task-name Service --ignore-return >> $@
 	@chmod +x $@

=== modified file 'tests/test-approver.c'
--- tests/test-approver.c	2010-07-10 02:23:59 +0000
+++ tests/test-approver.c	2010-07-12 19:07:42 +0000
@@ -136,6 +136,14 @@
 	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 @@
 	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);


Follow ups