Skip to content

Commit 453a4c8

Browse files
Fix FlakyAttribute (dotnet/extensions#2245)
\n\nCommit migrated from dotnet/extensions@1983ee8
1 parent c1a6c12 commit 453a4c8

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalFactDiscoverer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Xunit.Abstractions;
55
using Xunit.Sdk;
66

7+
// Do not change this namespace without changing the usage in ConditionalFactAttribute
78
namespace Microsoft.AspNetCore.Testing
89
{
910
internal class ConditionalFactDiscoverer : FactDiscoverer

src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/ConditionalTheoryDiscoverer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using Xunit.Abstractions;
66
using Xunit.Sdk;
77

8+
// Do not change this namespace without changing the usage in ConditionalTheoryAttribute
89
namespace Microsoft.AspNetCore.Testing
910
{
1011
internal class ConditionalTheoryDiscoverer : TheoryDiscoverer

src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyAttribute.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Testing
4949
/// to <c>xunit.console.exe</c>. Similarly, it can run only flaky tests using <c>-trait "Flaky:AzP:OS:all=true" -trait "Flaky:AzP:OS:Darwin=true"</c>
5050
/// </para>
5151
/// </example>
52-
[TraitDiscoverer("Microsoft.AspNetCore.Testing.xunit.FlakyTestDiscoverer", "Microsoft.AspNetCore.Testing")]
52+
[TraitDiscoverer("Microsoft.AspNetCore.Testing." + nameof(FlakyTestDiscoverer), "Microsoft.AspNetCore.Testing")]
5353
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
5454
public sealed class FlakyAttribute : Attribute, ITraitAttribute
5555
{
@@ -72,12 +72,12 @@ public sealed class FlakyAttribute : Attribute, ITraitAttribute
7272
/// <param name="additionalFilters">A list of additional filters that define where this test is flaky. Use values in <see cref="FlakyOn"/>.</param>
7373
public FlakyAttribute(string gitHubIssueUrl, string firstFilter, params string[] additionalFilters)
7474
{
75-
if(string.IsNullOrEmpty(gitHubIssueUrl))
75+
if (string.IsNullOrEmpty(gitHubIssueUrl))
7676
{
7777
throw new ArgumentNullException(nameof(gitHubIssueUrl));
7878
}
7979

80-
if(string.IsNullOrEmpty(firstFilter))
80+
if (string.IsNullOrEmpty(firstFilter))
8181
{
8282
throw new ArgumentNullException(nameof(firstFilter));
8383
}

src/TestingUtils/Microsoft.AspNetCore.Testing/src/xunit/FlakyTestDiscoverer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
43
using Xunit.Abstractions;
54
using Xunit.Sdk;
65

6+
// Do not change this namespace without changing the usage in FlakyAttribute
77
namespace Microsoft.AspNetCore.Testing
88
{
99
public class FlakyTestDiscoverer : ITraitDiscoverer

0 commit comments

Comments
 (0)