Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update flaky assert dependent on system clocks (#3771)

* Change expiration assert to 2 days
  • Loading branch information
chenriksson committed Apr 11, 2017
1 parent 29b3aa1 commit b24f084
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -303,7 +303,9 @@ private async Task<string> CreateVerificationKey(string packageId, string packag

var json = JObject.Parse(responseText);
var expiration = json.Value<DateTime>("Expires");
Assert.True(expiration - DateTime.UtcNow < TimeSpan.FromDays(1), "Verification keys should expire after 1 day.");

// Verification key should expire in 1 day. Ensure expiration is within 2 days in case client/server clocks differ.
Assert.True(expiration - DateTime.UtcNow < TimeSpan.FromDays(2), "Verification keys should expire after 1 day.");

return json.Value<string>("Key");
}
Expand Down

0 comments on commit b24f084

Please sign in to comment.