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

Fix for Issue #315 #318

Merged
merged 1 commit into from
Sep 18, 2015
Merged

Conversation

StephenBonikowsky
Copy link
Member

Fixes #315

@StephenBonikowsky
Copy link
Member Author

This is not intended for a Merge, I'm putting up what I got done as of today because I will be gone next week, I would like to complete it but I don't want fixing this to be blocked on me.

I left the original code commented out so it is easier to see what I'm changing.

With the fix as it currently is I am getting three other Scenario test failures but I haven't been able to investigate yet.
System.Private.ServiceModel\tests\Scenarios\Security\TransportSecurity\Https\ClientCredentialTypeTests.cs

  • Https_ClientCredentialTypeTests.BasicAuthentication_RoundTrips_Echo
  • Https_ClientCredentialTypeTests.BasicAuthenticationInvalidPwd_throw_MessageSecurityException

and

System.Private.ServiceModel\tests\Scenarios\Client\ExpectedExceptions\ExpectedExceptionTests.cs

  • ExpectedExceptionTests.UnknownUrl_Throws_EndpointNotFoundException

@@ -77,13 +77,17 @@ public object[] GetCustomAttributes(Type attributeType, bool inherit)
switch (this.ProviderType)
{
case AttributeProviderType.Type:
return this.Type.GetTypeInfo().GetCustomAttributes(attributeType, inherit).ToArray();
//return this.Type.GetTypeInfo().GetCustomAttributes(attributeType, inherit).ToArray();
return this.Type.GetTypeInfo().GetCustomAttributes().ToArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for going after the root cause @StephenBonikowsky . This PR will need a couple tweaks before merging.

We should not modify CustomAttributeProvider like this because that changes its general behavior for our specific failure case. I believe there is an alternate form of GetCustomAttributes which does not take an 'attributeType' parameter, and we should be calling that one instead. In other words, I would revert these changes to this version of GetCustomAttributes.

@roncain
Copy link
Contributor

roncain commented Sep 18, 2015

LGTM. IT is probably worth a buddy-build to test behavior in NET Native, but I recommend you go ahead and merge now. If it fails in NET Native we can open a new issue.

StephenBonikowsky added a commit that referenced this pull request Sep 18, 2015
@StephenBonikowsky StephenBonikowsky merged commit b93b9d4 into dotnet:master Sep 18, 2015
@StephenBonikowsky StephenBonikowsky deleted the Issue315 branch September 18, 2015 16:32
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