Skip to content

Commit

Permalink
Fix FlakyAttribute (#2245)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennanConroy authored Aug 28, 2019
1 parent 9ae2560 commit 1983ee8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Xunit.Abstractions;
using Xunit.Sdk;

// Do not change this namespace without changing the usage in ConditionalFactAttribute
namespace Microsoft.AspNetCore.Testing
{
internal class ConditionalFactDiscoverer : FactDiscoverer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Xunit.Abstractions;
using Xunit.Sdk;

// Do not change this namespace without changing the usage in ConditionalTheoryAttribute
namespace Microsoft.AspNetCore.Testing
{
internal class ConditionalTheoryDiscoverer : TheoryDiscoverer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace Microsoft.AspNetCore.Testing
/// 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>
/// </para>
/// </example>
[TraitDiscoverer("Microsoft.AspNetCore.Testing.xunit.FlakyTestDiscoverer", "Microsoft.AspNetCore.Testing")]
[TraitDiscoverer("Microsoft.AspNetCore.Testing." + nameof(FlakyTestDiscoverer), "Microsoft.AspNetCore.Testing")]
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class FlakyAttribute : Attribute, ITraitAttribute
{
Expand All @@ -72,12 +72,12 @@ public sealed class FlakyAttribute : Attribute, ITraitAttribute
/// <param name="additionalFilters">A list of additional filters that define where this test is flaky. Use values in <see cref="FlakyOn"/>.</param>
public FlakyAttribute(string gitHubIssueUrl, string firstFilter, params string[] additionalFilters)
{
if(string.IsNullOrEmpty(gitHubIssueUrl))
if (string.IsNullOrEmpty(gitHubIssueUrl))
{
throw new ArgumentNullException(nameof(gitHubIssueUrl));
}

if(string.IsNullOrEmpty(firstFilter))
if (string.IsNullOrEmpty(firstFilter))
{
throw new ArgumentNullException(nameof(firstFilter));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Xunit.Abstractions;
using Xunit.Sdk;

// Do not change this namespace without changing the usage in FlakyAttribute
namespace Microsoft.AspNetCore.Testing
{
public class FlakyTestDiscoverer : ITraitDiscoverer
Expand Down

0 comments on commit 1983ee8

Please sign in to comment.