From b2808452e837339aa72975ed581613951ba290bf Mon Sep 17 00:00:00 2001 From: James Crosswell Date: Fri, 25 Jul 2025 15:24:38 +1200 Subject: [PATCH 1/2] Disable CaptureException_AttachScreenshot_Threadsafe in CI Resolves #4389 - https://github.com/getsentry/sentry-dotnet/issues/4389 #skip-changelog --- test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs index 778d0ebf72..599a5aab66 100644 --- a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs +++ b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs @@ -184,6 +184,9 @@ public async Task CaptureException_BeforeCaptureScreenshot_DefaultAsync() [SkippableFact] public async Task CaptureException_AttachScreenshot_Threadsafe() { + #if ANDROID + Skip.If(TestEnvironment.IsGitHubActions, "Flaky in CI on Android"); + #endif // Arrange var builder = _fixture.Builder.UseSentry(options => options.AttachScreenshot = true); await using var app = builder.Build(); From 0a47b6bffe5f3d3892c34f51bc55c681549da500 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Fri, 25 Jul 2025 04:44:22 +0000 Subject: [PATCH 2/2] Format code --- test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs index 599a5aab66..89f9ad00af 100644 --- a/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs +++ b/test/Sentry.Maui.Tests/SentryMauiScreenshotTests.cs @@ -184,9 +184,9 @@ public async Task CaptureException_BeforeCaptureScreenshot_DefaultAsync() [SkippableFact] public async Task CaptureException_AttachScreenshot_Threadsafe() { - #if ANDROID +#if ANDROID Skip.If(TestEnvironment.IsGitHubActions, "Flaky in CI on Android"); - #endif +#endif // Arrange var builder = _fixture.Builder.UseSentry(options => options.AttachScreenshot = true); await using var app = builder.Build();