Skip to content

Commit

Permalink
Better Assert (with error message) for timestampt range (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liudmila Molkova authored Aug 7, 2019
1 parent b9db143 commit ff8f7b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/OpenTelemetry.Tests/Impl/Trace/SpanTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,7 @@ public void Dispose()
private void AssertApproxSameTimestamp(DateTime one, DateTime two)
{
var timeShift = Math.Abs((one - two).TotalMilliseconds);
Assert.True(timeShift > 0);
Assert.True(timeShift < 10);
Assert.InRange(timeShift, double.Epsilon, 10);
}
}
}

0 comments on commit ff8f7b6

Please sign in to comment.