Fix re-evaluation of condition in `Time.WaitUntil`
For example, seller.Marketplace.GetBalance() is captured once on call, and then is compared to a continually updated sellerWithFailures.Marketplace.GetBalance. Update RetryAssert such that `var c = constraint.Resolve();` is executed inside of the `Time.WaitUntil` instead of outside, so it is continually reevaluated.
This commit is contained in:
parent
ef2c18c599
commit
0d9aa230da
|
@ -10,8 +10,11 @@ namespace DistTestCore.Helpers
|
|||
{
|
||||
try
|
||||
{
|
||||
var c = constraint.Resolve();
|
||||
Time.WaitUntil(() => c.ApplyTo(actual()).IsSuccess);
|
||||
|
||||
Time.WaitUntil(() => {
|
||||
var c = constraint.Resolve();
|
||||
return c.ApplyTo(actual()).IsSuccess;
|
||||
});
|
||||
}
|
||||
catch (TimeoutException)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue