We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cb5853 commit 7ed87d1Copy full SHA for 7ed87d1
test/ICSharpCode.SharpZipLib.Tests/Zip/FastZipHandling.cs
@@ -725,7 +725,10 @@ public void CreateZipShouldSetTimeOnEntriesFromConstructorTimeSetting(TimeSettin
725
var archive = new MemoryStream(target.ToArray());
726
using (var zf = new ZipFile(archive))
727
{
728
- Assert.AreEqual(TestTargetTime(timeSetting), zf[0].DateTime);
+ var expectedTime = TestTargetTime(timeSetting);
729
+ var actualTime = zf[0].DateTime;
730
+ // Assert that the time is within +/- 2s of the target time to allow for timing/rounding discrepancies
731
+ Assert.LessOrEqual(Math.Abs((expectedTime - actualTime).TotalSeconds), 2);
732
}
733
734
0 commit comments