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

Upgrade xUnit to the latest version & warn about invalid ConfigureAwa… #12427

Merged

Conversation

kiminuo
Copy link
Contributor

@kiminuo kiminuo commented Feb 12, 2024

…it value & fix test

The PR enables the https://xunit.net/xunit.analyzers/rules/xUnit1030 analyzer which warns about this

using System.Threading.Tasks;
using Xunit;

public class xUnit1030
{
    [Fact]
    public async Task TestMethod()
    {
        await Task.Delay(1).ConfigureAwait(false); // this is incorrect, either remove ConfigureAwait or use `true` value

        // ...code running on thread pool thread...
    }
}

That's important because it can break how xUnit runs tests and that in turn can make a WW test flaky.

Copy link
Contributor

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK, tests are passing.

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kiminuo kiminuo merged commit f2e0be6 into WalletWasabi:master Feb 12, 2024
7 checks passed
@kiminuo kiminuo deleted the feature/2024-02-12-xunit-upgrade branch February 12, 2024 19:56
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 this pull request may close these issues.

3 participants