Skip to content

Commit

Permalink
Fix race condition in test
Browse files Browse the repository at this point in the history
  • Loading branch information
highlyunavailable committed Jul 22, 2015
1 parent 640b53f commit 9614c88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Consul.Test/LockTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,12 @@ public void Lock_ForceInvalidate()
{
Task.Delay(10).Wait();
}
Assert.IsFalse(lockKey.IsHeld);
});

Task.Run(() => { client.Session.Destroy(lockKey.LockSession); });

Task.WaitAny(new[] { checker }, 1000);

Assert.IsFalse(lockKey.IsHeld);
}
finally
{
Expand Down

0 comments on commit 9614c88

Please sign in to comment.