Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Nov 24, 2023
1 parent e6bf7a8 commit e08d4f6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/Sentry.Tests/UnobservedTaskExceptionIntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ private class Fixture

private SentryOptions SentryOptions { get; } = new();

#if !NET7_0_OR_GREATER // This is disabled on net7, see https://github.com/getsentry/sentry-dotnet/pull/2894
[Fact]
public void Handle_WithException_CaptureEvent()
{
Expand All @@ -26,6 +27,7 @@ public void Handle_WithException_CaptureEvent()

_ = _fixture.Hub.Received(1).CaptureEvent(Arg.Any<SentryEvent>());
}
#endif

// Test is flaky on mobile in CI.
#if !(__MOBILE__ && CI_BUILD)
Expand Down Expand Up @@ -86,8 +88,8 @@ public void Handle_UnobservedTaskException_CaptureEvent()

// The first should be the actual exception that was unobserved.
var actualException = exceptions[0];
// TODO: Create integration test to test this behaviour when publishing AOT apps
// See https://github.com/getsentry/sentry-dotnet/pull/2732#discussion_r1371006441
// TODO: Create integration test to test this behaviour when publishing AOT apps
// See https://github.com/getsentry/sentry-dotnet/pull/2732#discussion_r1371006441
Assert.NotNull(actualException.Stacktrace);
Assert.NotNull(actualException.Mechanism);
Assert.Equal("chained", actualException.Mechanism.Type);
Expand All @@ -99,8 +101,8 @@ public void Handle_UnobservedTaskException_CaptureEvent()

// The last should be the aggregate exception that raised the UnobservedTaskException event.
var aggregateException = exceptions[1];
// TODO: Create integration test to test this behaviour when publishing AOT apps
// See https://github.com/getsentry/sentry-dotnet/pull/2732#discussion_r1371006441
// TODO: Create integration test to test this behaviour when publishing AOT apps
// See https://github.com/getsentry/sentry-dotnet/pull/2732#discussion_r1371006441
Assert.Null(aggregateException.Stacktrace);
Assert.NotNull(aggregateException.Mechanism);
Assert.Equal("UnobservedTaskException", aggregateException.Mechanism.Type);
Expand Down

0 comments on commit e08d4f6

Please sign in to comment.