Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUnit1027 fired when CancellationToken and [CancelAfter] is given #663

Closed
gfoidl opened this issue Dec 9, 2023 · 1 comment · Fixed by #678
Closed

NUnit1027 fired when CancellationToken and [CancelAfter] is given #663

gfoidl opened this issue Dec 9, 2023 · 1 comment · Fixed by #678
Assignees
Milestone

Comments

@gfoidl
Copy link

gfoidl commented Dec 9, 2023

Repro (basically just the example from the docs:

[TestFixture]
public class MyTests
{
    [Test, CancelAfter(2000)]
    public void RunningTestUntilCanceled(CancellationToken token)
    {
        while (!token.IsCancellationRequested)
        {
            /* */
        }
    }
}

Expected behavior: the analyzer understand the [CancelAfter] attribute, so that the value for the argument will be given by the NUnit framework.

Actual behavior: the analyzer triggers
grafik

@manfred-brands manfred-brands self-assigned this Dec 10, 2023
@manfred-brands
Copy link
Member

Thanks @gfoidl that was an embarrassing oversight from me to forget about updating the analyzer. I have put it to my TODO list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants