Skip to content

Commit fad4f57

Browse files
Disable flaky Profiler tests in CI (#4487)
1 parent 282b5c6 commit fad4f57

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/Sentry.Profiling.Tests/SamplingTransactionProfilerTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ private SampleProfile CaptureAndValidate(ITransactionProfilerFactory factory)
117117
[SkippableFact]
118118
public void Profiler_WithZeroStartupTimeout_CapturesAfterStartingAsynchronously()
119119
{
120-
if (TestEnvironment.IsGitHubActions)
121-
{
122-
Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Flaky in CI on Windows.");
123-
Skip.If(RuntimeInformation.IsOSPlatform(OSPlatform.Linux), "Flaky in CI on Linux.");
124-
}
120+
Skip.If(TestEnvironment.IsGitHubActions, "Flaky in CI.");
125121

126122
using var factory = new SamplingTransactionProfilerFactory(_testSentryOptions, TimeSpan.Zero);
127123
var profiler = factory.Start(new TransactionTracer(Substitute.For<IHub>(), "test", ""), CancellationToken.None);
@@ -170,6 +166,8 @@ public void Profiler_MultipleProfiles_Works(int startTimeoutSeconds)
170166
[SkippableFact]
171167
public async Task Profiler_AfterTimeout_Stops()
172168
{
169+
Skip.If(TestEnvironment.IsGitHubActions && RuntimeInformation.IsOSPlatform(OSPlatform.Windows), "Flaky in CI on Windows");
170+
173171
SampleProfilerSession? session = null;
174172
SkipIfFailsInCI(() => session = SampleProfilerSession.StartNew(_testOutputLogger));
175173
using (session)

test/Sentry.Tests/GlobalSessionManagerTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ public void StartSession_CacheDirectoryProvidedButFileWriteDisabled_Installation
101101
Assert.False(_fixture.Options.FileSystem.FileExists(filePath));
102102
}
103103

104-
[Fact]
104+
[SkippableFact]
105105
public void StartSession_CacheDirectoryNotProvided_InstallationIdFileCreated()
106106
{
107+
Skip.If(TestEnvironment.IsGitHubActions, "Flaky in CI");
108+
107109
// Arrange
108110
_fixture.Options.CacheDirectoryPath = null;
109111
// Setting the test-cache directory to be properly disposed

0 commit comments

Comments
 (0)