diff --git a/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs b/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs index ac1855c6be..6f9ff84191 100644 --- a/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs +++ b/test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs @@ -184,8 +184,9 @@ public async Task Profiler_AfterTimeout_Stops() [SkippableFact] public async Task EventPipeSession_ReceivesExpectedCLREvents() { - SampleProfilerSession? session = null; - SkipIfFailsInCI(() => session = SampleProfilerSession.StartNew(_testOutputLogger)); + Skip.If(TestEnvironment.IsGitHubActions, "Flaky on CI"); + + var session = SampleProfilerSession.StartNew(_testOutputLogger); using (session) { var eventsReceived = new HashSet(); @@ -194,7 +195,6 @@ public async Task EventPipeSession_ReceivesExpectedCLREvents() var loadedMethods = new HashSet(); session!.EventSource.Clr.MethodLoadVerbose += (MethodLoadUnloadVerboseTraceData ev) => loadedMethods.Add(ev.MethodName); - await session.WaitForFirstEventAsync(CancellationToken.None); var limitMs = 50; var sut = new SamplingTransactionProfiler(_testSentryOptions, session, limitMs, CancellationToken.None);