Commit 0a21e25c authored by Travis Reitter's avatar Travis Reitter Committed by Jeremy Whiting
Browse files

Cut unnecessary locking in Tracker backend tests.

Closes: bgo#652637 - Don't hold locks across async calls
parent ddd19087
......@@ -12,6 +12,7 @@ Bugs fixed:
• Bug 669158 — Readonly/Offline issues
• Bug 675223 — Shouldn't warn if CM does not implement any contact list
• Bug 660128 — Most contacts don't have an avatar
• Bug 652637 — Don't hold locks across async calls
API changes:
• Add AntiLinkable interface and implement it on Kf.Persona and Edsf.Persona
......
......@@ -393,14 +393,10 @@ public class AddPersonaTests : Folks.TestCase
private void _try_to_add ()
{
lock (this._added_persona)
if (this._pstore.is_prepared && this._added_persona == false)
{
if (this._pstore.is_prepared &&
this._added_persona == false)
{
this._added_persona = true;
this._add_persona ();
}
this._added_persona = true;
this._add_persona ();
}
}
......
......@@ -141,14 +141,10 @@ public class DuplicatedEmailsTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -141,14 +141,10 @@ public class DuplicatedPhonesTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -198,14 +198,10 @@ public class MatchAllTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -153,14 +153,10 @@ public class MatchEmailAddressesTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -153,14 +153,10 @@ public class MatchIMAddressesTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -161,14 +161,10 @@ public class MatchKnownEmailsTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -213,14 +213,10 @@ public class MatchNameTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -155,14 +155,10 @@ public class MatchPhoneNumberTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
......@@ -175,14 +175,10 @@ public class SetDuplicateEmailTests : Folks.TestCase
private async void _try_to_add ()
{
lock (this._added_personas)
if (this._pstore.is_prepared && this._added_personas == false)
{
if (this._pstore.is_prepared &&
this._added_personas == false)
{
this._added_personas = true;
yield this._add_personas ();
}
this._added_personas = true;
yield this._add_personas ();
}
}
......
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