Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Add fixes for problems discovered by xunit.analyzers #1999

Merged
merged 3 commits into from
Aug 16, 2017

Conversation

natemcmaster
Copy link
Contributor

The new version of xunit.analyzers found a few interesting places where we had theory parameters that were never actually used. These changes will be required before upgrading to xunit 2.3.0-beta4 (cref aspnet/Universe#540)

@@ -1183,9 +1183,8 @@ public void AbortingTheConnectionSendsFIN()
}
}

[Theory]
[MemberData(nameof(ConnectionAdapterData))]
public async Task HeadersAndStreamsAreReusedAcrossRequests(ListenOptions listenOptions)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is interesting. We've been running this test twice, but listenOptions was never used to make the test inputs different. I traced this one back to a massive refactoring in our tests added by @halter73 here: #1280

Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

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

Good after the small comment changes.

@@ -335,7 +335,9 @@ public void InitializeStreamsResetsStreams()
string requestLine,
string expectedMethod,
string expectedRawTarget,
#pragma warning disable xUnit1026 // Theory methods should use all of their parameters
Copy link
Member

Choose a reason for hiding this comment

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

Comment that it's sharing theory data with with HttpParserTests.ParsesRequestLine.

@@ -26,8 +26,10 @@ public class HttpParserTests
string expectedMethod,
string expectedRawTarget,
string expectedRawPath,
#pragma warning disable xUnit1026 // Theory methods should use all of their parameters
Copy link
Member

Choose a reason for hiding this comment

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

Comment that it's sharing theory data with FrameTests.TakeStartLineSetsFrameProperties.

@natemcmaster natemcmaster merged commit c10ac85 into aspnet:dev Aug 16, 2017
@natemcmaster natemcmaster deleted the xunit-analyzers branch August 16, 2017 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants