[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 15:31:08 +0000 (UTC)
commit 8e1cbd529ddfa32d6b4802486da4c5dc19aff0b0
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 | 13 +++++++++++++
folks/individual-aggregator.vala | 2 ++
tests/eds/add-persona.vala | 14 +++++++++++++-
tests/meson.build | 1 +
5 files changed, 30 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..945b652f 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;
}
@@ -2523,6 +2532,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
if (added_personas.size > 0 && this._is_quiescent == true)
{
+ debug("_added_idle: Emitting personas changed!");
this._emit_personas_changed (added_personas, removed_personas);
}
@@ -2593,6 +2603,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
if (removed_personas.size > 0)
{
+ debug("_removed_idle: Emitting personas changed!");
this._emit_personas_changed (null, removed_personas);
}
return false;
@@ -2641,6 +2652,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
* lot more efficient for the individual aggregator to handle. */
if (this._pending_personas != null)
{
+ debug("_complete_idle: Emitting personas changed!");
this._emit_personas_changed (this._pending_personas, null);
this._pending_personas = null;
}
@@ -2848,6 +2860,7 @@ public class Edsf.PersonaStore : Folks.PersonaStore
removed_personas.add (iter.get_value ());
}
+ debug("_source_registry_changed: Emitting personas changed!");
this._emit_personas_changed (null, removed_personas);
this.removed ();
}
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 5e5f386d..d15ceefc 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -2044,8 +2044,10 @@ public class Folks.IndividualAggregator : Object
}
}
+ debug("Done adding persona from details");
if (parent != null && persona != null)
{
+ debug("Adding individual to parent %p", parent);
((!) parent).personas.add ((!) 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]