Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable HubTests.FlushOnDispose_SendsEnvelope #2492

Merged
merged 6 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/Sentry.Testing/RepeatAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
namespace Sentry.Testing;

public class RepeatAttribute : Xunit.Sdk.DataAttribute
{
private readonly int _count;
private readonly object[] _data;

public RepeatAttribute(int count, params object[] data)
{
if (count < 1)
{
throw new ArgumentOutOfRangeException(nameof(count),
"Repeat count must be greater than 0.");
}

_count = count;
_data = data;
}

public override IEnumerable<object[]> GetData(MethodInfo testMethod)
{
return Enumerable.Repeat(_data, _count);
}
}
8 changes: 2 additions & 6 deletions test/Sentry.Tests/HubTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1290,14 +1290,10 @@ public void CaptureTransaction_EventProcessor_Gets_ScopeAttachments()
hint.Attachments.Should().Contain(attachments);
}

#if ANDROID && CI_BUILD
// TODO: Test is flaky in CI
[SkippableTheory(typeof(NSubstitute.Exceptions.ReceivedCallsException))]
#else
[Theory]
#endif
[InlineData(false)]
[InlineData(true)]
// [InlineData(true)]
[Repeat(20, true)]
jamescrosswell marked this conversation as resolved.
Show resolved Hide resolved
public async Task FlushOnDispose_SendsEnvelope(bool cachingEnabled)
{
// Arrange
Expand Down
Loading