Permalink
Browse files

Update flaky assert dependent on system clocks (#3771)


* Change expiration assert to 2 days
  • Loading branch information...
1 parent 29b3aa1 commit b24f0845f9a800e36a881554cceb43be1dfbbe22 @chenriksson chenriksson committed Apr 11, 2017
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/NuGetGallery.FunctionalTests/ODataFeeds/V2FeedExtendedTests.cs
@@ -303,7 +303,9 @@ private static string GetPackagesAppearInFeedInOrderUrl(DateTime time, string ti
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");
}

0 comments on commit b24f084

Please sign in to comment.