-
Notifications
You must be signed in to change notification settings - Fork 565
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
Add scenario test for channel extensibility model #1171
Add scenario test for channel extensibility model #1171
Conversation
@dotnet-bot test outerloop Windows_NT |
@khdang could you rebase and try again? All the Outerloop tests failed in unexpected ways. The selfhost failure has a compile error, meaning you are probably also failing to build under IIS. |
If you try to build tools\SelfHostedWcfService\SelfHostedWcfService.sln you will see many compile errors. This explains why all OuterLoops fail because neither self-host nor IIS-host can build the server side code. After rebasing and resolving the merge conflicts reported, please do 'build /p:WithCategories=OuterLoop' to verify the code runs before updating the PR In reply to: 219699069 [](ancestors = 219699069) |
using System.ServiceModel; | ||
using System.ServiceModel.Channels; | ||
|
||
namespace WcfService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is in the wrong place. All server-side .cs files live under the IISHostedWcfService\App_code folder and are included by the self-host project. Was there some reason you could not put this in IISHostedWcfService?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not intentional I'll move this to IISHostedWcfService\App_code folder
I think the tests really belong in a new folder under Scenarios/Extensibility. This is all about the extensibility at the channel layer and less about testing CustomBinding. |
Yes I agree, this test is meant to replace the old test we had that was based on the Mahjong game to test the MessageInspector scenario. Also, there are a lot of extra files needed for the test, I would recommend putting the test itself in a MessageInspectorTests.cs and all the other files under another subdirectory called "TestData", I plan on going back and making this same kind of change in other test folders, this way it is easy to differentiate files containing the tests and any other supporting files. You will need to add a new *.csproj and add it to the solution. |
@@ -51,4 +51,69 @@ public static void DefaultSettings_Tcp_Binary_Echo_RoundTrips_String() | |||
ScenarioTestHelpers.CloseCommunicationObjects((ICommunicationObject)serviceProxy, factory); | |||
} | |||
} | |||
|
|||
public class MessageModifier : ChannelMessageInterceptor | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test files should only contain test methods, could you move this to a separate file or into one of the other test support files you already have.
I have a task to clean this up in other areas of our test bed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ron and Stephen! That makes sense. Let me move this new test to Scenarios/Extensibility
a96dc07
to
083bea4
Compare
@dotnet-bot test outerloop Windows_NT |
083bea4
to
42f84cf
Compare
|
||
[Fact] | ||
[OuterLoop] | ||
[ActiveIssue(1170)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to understand why this test fails before we disable it. @khdang , can this test be changed to pass, or do we understand the failure enough to know it is a product issue?
@dotnet-bot test outerloop Windows_NT |
@khdang -- would you please ping this PR when it is ready to review? It still fails to build, which is why you get a 100% failure rate in OuterLoops. You can see this by building SelfHostedWcfService.sln. These same errors will occur when IIS attempts to build the contents of its virtual directory, meaning no WCF services are available.
|
Initially I run StartWCFSelfHostedService.cmd and it went pass the "Building WCF Self hosted sevice.." step without error so I thought there is no issues with the build. But I did notice the errors in your previous comments. Let me resolve that. |
@dotnet-bot test outerloop Windows_NT |
I've fixed the errors when building SelfHostedWCFService. It's a bug in CodeFormatter that it doesn't rename all the occurrences of variables. I've fixed the tests issue as well by opening channels properly. I think this should verify that the channel extensibility model works. As for #623 2nd task, the LayeredChannel doesn't seem to be covered with this test so that need to be done separately. |
It looks like I need to update the test service for the new tests.
|
@@ -39,6 +39,7 @@ | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="System" /> | |||
<Reference Include="System.configuration" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: System.Configuration (upper-case 'C")
LGTM subject to a couple things:
Once we get an CI OuterLoop pass for all OSes, I'm fine merging this. |
@dotnet-bot test outerloop Windows_NT |
@dotnet-bot test all outerloop please |
@dotnet-bot test OuterLoop Selfhost Windows_NT Release |
@khdang -- I think the Ubuntu and OSX OuterLoop failures are unrelated to your PR, and you should go ahead and merge. /cc: @iamjasonp |
Thanks @roncain! I will squash the commits and merge. |
ab0b94e
to
bbaeb92
Compare
@dotnet-bot test all outerloop please |
ACK - issues look transient to me |
LGTM. I recommend checking in asap @khdang -- today is the last day before we branch. |
I've ported the Custom Message Interceptor but it seems that the channel extensibility model doesn't work yet.
Ref #623 #1170