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 build #671

Closed
wants to merge 2 commits into from
Closed

Fix build #671

wants to merge 2 commits into from

Conversation

nohwnd
Copy link
Member

@nohwnd nohwnd commented Jan 3, 2020

Fix build failing after merged pull request.

@nohwnd
Copy link
Member Author

nohwnd commented Jan 6, 2020

Error Message:
 Test method MSTestAdapter.Smoke.E2ETests.CompatTests.RunAllCompatTests threw exception: 
System.InvalidOperationException: Test run ended with 1 errors.
An exception occurred while invoking executor 'executor://mstestadapter/v2': 3 arguments were passed to 'Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner::RunSingleTest'. 2 arguments were expected by this method.
Stack Trace:
    at Microsoft.MSTestV2.CLIAutomation.RunEventsHandler.EnsureSuccess() in D:\a\1\s\test\E2ETests\Automation.CLI\RunEventsHandler.cs:line 125
   at Microsoft.MSTestV2.CLIAutomation.CLITestBase.InvokeVsTestForExecution(String[] sources, String runSettings, String testCaseFilter) in D:\a\1\s\test\E2ETests\Automation.CLI\CLITestBase.cs:line 80
   at MSTestAdapter.Smoke.E2ETests.CompatTests.RunAllCompatTests() in D:\a\1\s\test\E2ETests\Smoke.E2E.Tests\CompatTests.cs:line 34

The build fails becase the api is no longer compatible with the api published by the legacy adapter that is used in the test. Investigating what is the best way to fix this.

@nohwnd
Copy link
Member Author

nohwnd commented Jan 6, 2020

@AbhitejJohn I can't figure this out, I can't locate where exactly it fails and figure out how to better debug this. Any suggestions how to approach this?

To me it seems that we are invoking the Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner::RunSingleTest indirectly via reflection, but the number of parameters is not correct because we probably take the information about the method from the new type (with 3 parameters) and trying to invoke an older version of the type (which has 2 parameters). But as I said this is just me guessing what could be the problem. I tried debugging this in multiple ways (replacing the dlls, generating pdbs, attaching vs to the child process) but none of them allowed me to see where exactly it fails.

@AbhitejJohn
Copy link
Contributor

@nohwnd: Sorry I usually tend to miss github tags. Please hit me up on teams if you need anything I haven't responded on. This specific issue does indeed sound like we have two different versions of the adapter on either side of the app domain which is a recipe for disaster. I dont know if these smoke tests test the adapter against its latest self - It ideally should. Maybe that's the problem.

@nohwnd
Copy link
Member Author

nohwnd commented Mar 11, 2020

@AbhitejJohn no problem, it's stale, I ended up fixing it and we even discussed it in an internal mail thread about how to evolve the test platform interfaces. :)

The problem is what you described, there is non-explicit dependency on an interface, and because we compile against one version of the library, but end up resolving to another version it fails when non compatible change is done to that interface. Closing this.

@nohwnd nohwnd closed this Mar 11, 2020
@AbhitejJohn
Copy link
Contributor

ah sounds good.

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.

2 participants