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

Pass DisposalToken in tests #11127

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

davidwengier
Copy link
Contributor

Random pet peeves on a Thursday evening.

@davidwengier davidwengier requested a review from a team as a code owner October 31, 2024 10:21
davidwengier and others added 2 commits October 31, 2024 22:24
These tests had been changed to set up mocks with DisposalToken from the testing infrastructure. However, the product code being tested doesn't have access to that CancellationToken and always passes CancellationToken.None to the method being mocked.
@DustinCampbell
Copy link
Member

DustinCampbell commented Oct 31, 2024

@davidwengier: I went and pushed a commit to fix up the failing tests. I hope that's ok!

Copy link
Member

@DustinCampbell DustinCampbell left a comment

Choose a reason for hiding this comment

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

Awesome clean up! Thanks!


namespace Microsoft.AspNetCore.Razor.ProjectEngineHost.Test;

public class StreamExtensionTests
public class StreamExtensionTests(ITestOutputHelper testOutputHelper) : ToolingTestBase(testOutputHelper)
Copy link
Member

Choose a reason for hiding this comment

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

Thank you!

@davidwengier
Copy link
Contributor Author

@davidwengier: I went and pushed a commit to fix up the failing tests. I hope that's ok!

I probably would have used It.IsAny<CancellationToken>(), like I did in the LiveShare tests, but it feels rude to override your generous contribution :) Thank you!

@davidwengier davidwengier merged commit 17eec65 into dotnet:main Oct 31, 2024
12 checks passed
@davidwengier davidwengier deleted the BanDefaultCancellationTokens branch October 31, 2024 21:09
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 31, 2024
@DustinCampbell
Copy link
Member

I just put it back like it was. 😄

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.

4 participants