[folks/wip/nielsdg/fix-ci-timeout] wip
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks/wip/nielsdg/fix-ci-timeout] wip
- Date: Sat, 6 Jun 2020 14:45:02 +0000 (UTC)
commit b5ba1b9425eb39a5351832cca9ff434e38d3f233
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Jun 5 13:36:39 2020 +0200
wip
.gitlab-ci/run-tests.sh | 2 +-
backends/eds/lib/edsf-persona-store.vala | 9 +++++++++
tests/eds/add-persona.vala | 14 +++++++++++++-
tests/meson.build | 1 +
4 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
index dfb828c5..fb23bc88 100755
--- a/.gitlab-ci/run-tests.sh
+++ b/.gitlab-ci/run-tests.sh
@@ -2,7 +2,7 @@
set +e
-meson test -C _build $*
+meson test -C _build $* add-persona
exit_code=$?
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index 4afd9d22..b3ab1815 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -489,6 +489,8 @@ public class Edsf.PersonaStore : Folks.PersonaStore
{
Set<PhoneFieldDetails> phone_numbers =
(Set<PhoneFieldDetails>) v.get_object ();
+
+ debug ("Setting TELEPHONE NUMBER");
this._set_contact_attributes_string (contact,
phone_numbers, "TEL",
E.ContactField.TEL);
@@ -576,6 +578,13 @@ public class Edsf.PersonaStore : Folks.PersonaStore
var _persona = this._personas.get (iid);
assert (_persona != null);
+ debug("Persona is PhoneDetails: %s", (_persona is PhoneDetails).to_string());
+ if (_persona is PhoneDetails) {
+ foreach (var pf in ((PhoneDetails) _persona).phone_numbers) {
+ debug("Got phone number '%s'", pf.value);
+ }
+ }
+
return _persona;
}
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index ce64ce19..9af33fe2 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -279,6 +279,8 @@ public class AddPersonaTests : EdsTest.TestCase
uint num_replaces = 0;
+ message ("YYYYYY individuals changed");
+
foreach (var i in added)
{
if (i == null)
@@ -286,9 +288,11 @@ public class AddPersonaTests : EdsTest.TestCase
continue;
}
+ debug_here();
num_replaces = this._track_individual (i);
}
+ debug_here();
assert (removed.size <= num_replaces + 1);
}
@@ -303,9 +307,12 @@ public class AddPersonaTests : EdsTest.TestCase
assert (this._individual_received == null ||
this._individual_received.id == i.id);
+ debug_here();
+
/* handle replacement */
if (this._individual_received != null)
{
+ debug_here();
i.notify["full-name"].disconnect (this._notify_cb);
i.notify["nickname"].disconnect (this._notify_cb);
i.notify["email-addresses"].disconnect (this._notify_cb);
@@ -338,6 +345,7 @@ public class AddPersonaTests : EdsTest.TestCase
i.notify["roles"].connect (this._notify_cb);
i.notify["is-favourite"].connect (this._notify_cb);
+ debug_here();
this._check_properties.begin (i);
}
@@ -346,6 +354,7 @@ public class AddPersonaTests : EdsTest.TestCase
private void _notify_cb (Object individual_obj, ParamSpec ps)
{
+ message ("_notify_cb called for ps '%s'", ps.get_name());
Folks.Individual i = (Folks.Individual) individual_obj;
this._check_properties.begin (i);
}
@@ -474,11 +483,14 @@ public class AddPersonaTests : EdsTest.TestCase
private void _exit_if_all_properties_found ()
{
+ debug("--------------------------------------------------");
foreach (var k in this._properties_found.get_keys ())
{
var v = this._properties_found.lookup (k);
- if (v == false)
+ if (v == false) {
+ debug("Haven't found '%s' yet", k);
return;
+ }
}
this._main_loop.quit ();
}
diff --git a/tests/meson.build b/tests/meson.build
index 6a7fa29c..3ac3ec49 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -26,6 +26,7 @@ common_test_vala_flags = [
common_test_environment = environment()
common_test_environment.append('FOLKS_BACKEND_PATH', folks_backend_path_uninstalled)
+common_test_environment.append('G_MESSAGES_DEBUG', 'all')
# The tests, grouped in a directory per backend
subdir('dummy')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]