Convenient rerun attribute

This commit is contained in:
ThatBen 2025-06-06 09:49:55 +02:00
parent aa4576c97d
commit 0e4a6774ef
No known key found for this signature in database
GPG Key ID: 62C543548433D43E
5 changed files with 20 additions and 4 deletions

View File

@ -21,7 +21,7 @@ namespace CodexReleaseTests.MarketTests
[Test]
[Combinatorial]
public void Fail(
[Values([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])] int rerun
[Rerun] int rerun
)
{
var hosts = StartHosts();

View File

@ -27,7 +27,7 @@ namespace CodexReleaseTests.MarketTests
[Test]
[Combinatorial]
public void Finish(
[Values([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])] int rerun
[Rerun] int rerun
)
{
var hosts = StartHosts();

View File

@ -34,7 +34,7 @@ namespace CodexReleaseTests.MarketTests
[Test]
[Combinatorial]
public void RollingRepairSingleFailure(
[Values([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])] int rerun,
[Rerun] int rerun,
[Values(10)] int numFailures)
{
var hosts = StartHosts().ToList();

View File

@ -23,7 +23,7 @@ namespace CodexReleaseTests.MarketTests
[Test]
[Combinatorial]
public void Start(
[Values([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])] int rerun
[Rerun] int rerun
)
{
var hosts = StartHosts();

View File

@ -0,0 +1,16 @@
using NUnit.Framework;
namespace CodexReleaseTests
{
public class RerunAttribute : ValuesAttribute
{
private const int NumberOfReRuns = 1;
public RerunAttribute()
{
var list = new List<object>();
for (var i = 0; i < NumberOfReRuns; i++) list.Add(i);
data = list.ToArray();
}
}
}