From 49783d7014a6f5342ec77f56e81aeab6954bc2ec Mon Sep 17 00:00:00 2001 From: William Hua Date: Wed, 7 Aug 2013 10:45:42 -0400 Subject: Resolve flaky test by forcing a delay. --- tests/main.vala | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/main.vala b/tests/main.vala index a26eca55..09d612f1 100644 --- a/tests/main.vala +++ b/tests/main.vala @@ -150,18 +150,12 @@ static void test_activate_input_source (void *data) { var action_group = DBusActionGroup.get ((!) fixture.connection, "com.canonical.indicator.keyboard", "/com/canonical/indicator/keyboard"); - var loop = new MainLoop (null, false); - var signal_name = action_group.action_state_changed["current"].connect ((action, state) => { - loop.quit (); - }); - action_group.list_actions (); action_group.activate_action ("current", new Variant.uint32 (2)); - var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; }); + var loop = new MainLoop (null, false); + Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; }); loop.run (); - Source.remove (source); - action_group.disconnect (signal_name); var state = action_group.get_action_state ("current"); var current = state.get_uint32 (); -- cgit v1.2.3