mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-24 09:28:24 +00:00
20 lines
629 B
C#
20 lines
629 B
C#
|
|
// Copyright (c) Duende Software. All rights reserved.
|
||
|
|
// See LICENSE in the project root for license information.
|
||
|
|
|
||
|
|
using System.Runtime.CompilerServices;
|
||
|
|
using Xunit.v3;
|
||
|
|
|
||
|
|
namespace Duende.Xunit.Playwright.Retries;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Works just like [Fact] except that failures are retried (by default, 5 times).
|
||
|
|
/// </summary>
|
||
|
|
[XunitTestCaseDiscoverer(typeof(RetryFactDiscoverer))]
|
||
|
|
public class RetryableFactAttribute(
|
||
|
|
[CallerFilePath] string? sourceFilePath = null,
|
||
|
|
[CallerLineNumber] int sourceLineNumber = -1) :
|
||
|
|
FactAttribute(sourceFilePath, sourceLineNumber)
|
||
|
|
{
|
||
|
|
public int MaxRetries { get; set; } = 5;
|
||
|
|
}
|