aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2013-08-21 12:46:54 +0800
committerWilliam Hua <william.hua@canonical.com>2013-08-21 12:46:54 +0800
commit100ba6845fca6709ffcc80614e2dcc821615834f (patch)
treeb003325582b94b690c0f79b484440b8d1494d25b
parentdf3cf3ed4283c6e28c5c530542653b0906655b48 (diff)
downloadayatana-indicator-keyboard-100ba6845fca6709ffcc80614e2dcc821615834f.tar.gz
ayatana-indicator-keyboard-100ba6845fca6709ffcc80614e2dcc821615834f.tar.bz2
ayatana-indicator-keyboard-100ba6845fca6709ffcc80614e2dcc821615834f.zip
Use long delays in places when they may be killed prematurely.
-rw-r--r--po/indicator-keyboard.pot2
-rw-r--r--tests/main.vala21
2 files changed, 12 insertions, 11 deletions
diff --git a/po/indicator-keyboard.pot b/po/indicator-keyboard.pot
index b5d5cfca..b657f08e 100644
--- a/po/indicator-keyboard.pot
+++ b/po/indicator-keyboard.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-08-12 09:33+0800\n"
+"POT-Creation-Date: 2013-08-21 12:15+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/tests/main.vala b/tests/main.vala
index 6bbcc61a..1a7833a2 100644
--- a/tests/main.vala
+++ b/tests/main.vala
@@ -18,6 +18,7 @@
const int TIMEOUT_S = 1;
const int TIMEOUT_MS = 1000;
+const int LONG_TIMEOUT_S = 10;
[DBus (name = "com.canonical.indicator.keyboard.test")]
public class Service : Object {
@@ -193,7 +194,7 @@ static void test_activate_character_map (void *data) {
action_group.activate_action ("map", null);
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -232,7 +233,7 @@ static void test_activate_keyboard_layout_chart (void *data) {
action_group.activate_action ("chart", null);
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -260,7 +261,7 @@ static void test_activate_text_entry_settings (void *data) {
action_group.activate_action ("settings", null);
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
((!) fixture.service).disconnect (signal_name);
@@ -294,7 +295,7 @@ static void test_migration (void *data) {
try {
var cancellable = new Cancellable ();
- var source = Timeout.add_seconds (TIMEOUT_S, () => { cancellable.cancel (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return false; });
var dbus_proxy = new DBusProxy.sync ((!) fixture.connection,
DBusProxyFlags.NONE,
@@ -360,7 +361,7 @@ static void test_no_migration (void *data) {
try {
var cancellable = new Cancellable ();
- var source = Timeout.add_seconds (TIMEOUT_S, () => { cancellable.cancel (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { cancellable.cancel (); return false; });
var dbus_proxy = new DBusProxy.sync ((!) fixture.connection,
DBusProxyFlags.NONE,
@@ -431,7 +432,7 @@ static void test_update_visible (void *data) {
action_group.list_actions ();
- var source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ var source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -455,7 +456,7 @@ static void test_update_visible (void *data) {
return;
}
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -479,7 +480,7 @@ static void test_update_visible (void *data) {
return;
}
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -564,7 +565,7 @@ static void test_update_input_source (void *data) {
return;
}
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
action_group.disconnect (signal_name);
@@ -671,7 +672,7 @@ static void test_update_input_sources (void *data) {
return;
}
- source = Timeout.add_seconds (TIMEOUT_S, () => { loop.quit (); return false; });
+ source = Timeout.add_seconds (LONG_TIMEOUT_S, () => { loop.quit (); return false; });
loop.run ();
Source.remove (source);
section.disconnect (signal_name);