Skip to content

Commit 57761c0

Browse files
Disable Profiler_MultipleProfiles_Works in CI (flaky) (#4383)
* Disable Profiler_MultipleProfiles_Works in CI (flaky) #skip-changelog * Skip Profiler_WithZeroStartupTimeout_CapturesAfterStartingAsynchronously on targets as well * .
1 parent 087408c commit 57761c0

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ private SampleProfile CaptureAndValidate(ITransactionProfilerFactory factory)
117117
[SkippableFact]
118118
public void Profiler_WithZeroStartupTimeout_CapturesAfterStartingAsynchronously()
119119
{
120+
if (TestEnvironment.IsGitHubActions)
121+
{
122+
Skip.If(TestEnvironment.IsWinX64, "Flaky in CI on Windows X64.");
123+
Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Linux), "Flaky in CI on Linux.");
124+
}
125+
120126
using var factory = new SamplingTransactionProfilerFactory(_testSentryOptions, TimeSpan.Zero);
121127
var profiler = factory.Start(new TransactionTracer(Substitute.For<IHub>(), "test", ""), CancellationToken.None);
122128
Assert.Null(profiler);
@@ -146,6 +152,8 @@ private void Profiler_SingleProfile_Works(int startTimeoutSeconds)
146152
[InlineData(10)]
147153
public void Profiler_MultipleProfiles_Works(int startTimeoutSeconds)
148154
{
155+
Skip.If(TestEnvironment.IsGitHubActions, "Flaky in CI");
156+
149157
using var factory = new SamplingTransactionProfilerFactory(_testSentryOptions, TimeSpan.FromSeconds(startTimeoutSeconds));
150158
// in the async startup case, we need to wait before collecting
151159
if (startTimeoutSeconds == 0)

test/Sentry.Testing/TestEnvironment.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ public static bool IsGitHubActions
1515
return isGitHubActions?.Equals("true", StringComparison.OrdinalIgnoreCase) == true;
1616
}
1717
}
18+
19+
public static bool IsWinX64 => RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
20+
&& RuntimeInformation.OSArchitecture == Architecture.X64;
1821
}

0 commit comments

Comments
 (0)