Skip to content

Bug report: [ValueSource] doesn't play nice with [CancelAfter] #4782

@DSinMeliodas

Description

@DSinMeliodas

The use of the ValueSourceAttribute in combination with the CancelAfter attribute causes similiar issues as described in #4770 when using NUnit 4.1.0 w/ Microsoft.NET.Test.Sdk v17.10.0 and NUnit3TestAdapter.

public static bool[] Parameters = [true, false];

[Test, CancelAfter(2000), Pairwise]
public async Task RunningTestUntilCanceled([ValueSource(nameof(Parameters))]bool a, CancellationToken token)
{
    await Task.Delay(1, token);
}

[Test, CancelAfter(2000)]
public async Task RunningTestUntilCanceled([ValueSource(nameof(Parameters))]bool a, CancellationToken token)
{
    await Task.Delay(1, token);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions