Commit 3485f63a authored by Jeremy Whiting's avatar Jeremy Whiting
Browse files

tracker: Fix tracker unit tests to wait until persona store is prepared.

parent cfcebbd6
......@@ -118,8 +118,7 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
break;
}
assert (pstore != null);
yield _add_personas (pstore);
pstore.notify["is-prepared"].connect (this._persona_store_prepared_cb);
}
catch (GLib.Error e)
{
......@@ -127,6 +126,13 @@ public class LinkPersonasViaLocalIDsTests : Folks.TestCase
}
}
private void _persona_store_prepared_cb (Object obj, ParamSpec params)
{
PersonaStore pstore = (!)(obj as PersonaStore);
_add_personas (pstore);
}
/* Here is how this test is expected to work:
* - we start by adding 2 personas
* - this should trigger individuals-changed with 2 new individuals
......
......@@ -119,8 +119,7 @@ public class LinkPersonasTests : Folks.TestCase
break;
}
assert (pstore != null);
yield _add_personas (pstore);
pstore.notify["is-prepared"].connect (this._persona_store_prepared_cb);
}
catch (GLib.Error e)
{
......@@ -128,6 +127,13 @@ public class LinkPersonasTests : Folks.TestCase
}
}
private void _persona_store_prepared_cb (Object obj, ParamSpec params)
{
PersonaStore pstore = (!)(obj as PersonaStore);
_add_personas (pstore);
}
/* Here is how this test is expected to work:
* - we start by adding 2 personas
* - this should trigger individuals-changed with 2 new individuals
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment