Skip to content

Commit 2e90dee

Browse files
Skip Profiler_WithZeroStartupTimeout_CapturesAfterStartingAsynchronously on targets as well
1 parent 30e9883 commit 2e90dee

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ private SampleProfile CaptureAndValidate(ITransactionProfilerFactory factory)
117117
[SkippableFact]
118118
public void Profiler_WithZeroStartupTimeout_CapturesAfterStartingAsynchronously()
119119
{
120+
Skip.If(TestEnvironment.IsGitHubActions && (TestEnvironment.IsWinX64 || TestEnvironment.IsLinux),
121+
"Flaky in CI on Windows X64 and Linux.");
122+
120123
using var factory = new SamplingTransactionProfilerFactory(_testSentryOptions, TimeSpan.Zero);
121124
var profiler = factory.Start(new TransactionTracer(Substitute.For<IHub>(), "test", ""), CancellationToken.None);
122125
Assert.Null(profiler);

test/Sentry.Testing/TestEnvironment.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ public static bool IsGitHubActions
1515
return isGitHubActions?.Equals("true", StringComparison.OrdinalIgnoreCase) == true;
1616
}
1717
}
18+
19+
public static bool IsWinX64 => RuntimeInformation.OSArchitecture == Architecture.X64
20+
&& RuntimeInformation.OSDescription.Contains("Windows");
21+
22+
public static bool IsLinux => RuntimeInformation.OSDescription.Contains("Linux");
1823
}

0 commit comments

Comments
 (0)