Skip to content

Commit

Permalink
Stabilize ShouldRaiseLaunchEndScope test
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Feb 22, 2024
1 parent f679cce commit 08eddf1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/ReportPortal.Shared.Tests/Execution/LogScopeFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ public void ShouldRaiseLaunchEndScope()
var launchContext = new LaunchContext(extensionManager, new CommandsSource(new List<ICommandsListener> { listener.Object }));

var scope = launchContext.Log.BeginScope("qwe");
var scopeEndTime = DateTime.UtcNow;
scope.Dispose();

lc.Should().Be(launchContext);
logScope.Name.Should().Be("qwe");
logScope.EndTime.Should().BeCloseTo(DateTime.UtcNow, precision: TimeSpan.FromMilliseconds(30));
logScope.EndTime.Should().BeCloseTo(scopeEndTime, precision: TimeSpan.FromMilliseconds(60));
}

[Fact]
Expand Down

0 comments on commit 08eddf1

Please sign in to comment.