mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-23 17:08:21 +00:00
- Add RetryableFact infrastructure for xUnit v3 in shared/Xunit.Playwright/Retries/: RetryableFactAttribute, RetryFactDiscoverer, RetryableTestCase, RetryTestCaseRunner, DelayedMessageBus — based on the official xUnit v3 samples - Apply [RetryableFact] to BffBlazorWebAssemblyTests and BffBlazorTemplateTests which have a startup race condition (IdentityServer not fully ready on first attempt) - Comment out MvcJarUriJwt InlineData in IdentityServerTests — the JAR URI fetch is not reachable in the GitHub Actions environment (pre-existing CI failure)
19 lines
629 B
C#
19 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;
|
|
}
|