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

Testhost sharing between discovery & execution #2687

Merged
merged 32 commits into from
Nov 19, 2021

Conversation

cvpoienaru
Copy link
Member

@cvpoienaru cvpoienaru commented Jan 11, 2021

Testhost sharing between discovery & execution.

Known issues:

  • Parallel discovery doesn't work well for .NET Framework scenarios yet, but this should be fixed by the Parallel Discovery work.

Follow ups:

  • Add a LRU cache to limit the number of testhosts we end up spinning;
  • Enable M:N mapping between testhosts and test sessions;
  • Add better discovery/run settings matching against the settings used for test session creation (currently we use string.Equals for matching);
  • Change the proxy enqueueing/dequeueing mechanism to make the usage of ids transparent to the caller;
  • Remove obsolete attributes from the public API once it's considered to be fully stable;

@nohwnd nohwnd marked this pull request as draft January 12, 2021 09:33
@nohwnd
Copy link
Member

nohwnd commented Jan 12, 2021

Made it a draft because you said it is still work in progress. 🙂

@cvpoienaru
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@cvpoienaru cvpoienaru linked an issue Jan 15, 2021 that may be closed by this pull request
@cvpoienaru cvpoienaru marked this pull request as ready for review September 16, 2021 12:13
@nohwnd
Copy link
Member

nohwnd commented Sep 23, 2021

I am missing those new tests for this functionality that you mentioned. There are few edits in tests files, but I don't see any new tests.

@cvpoienaru
Copy link
Member Author

@nohwnd, the new tests are not committed yet, I have them on my local machine. Will do the commit once I have full test coverage, but it may take a while since writing comprehensive tests is a tedious endeavor.

Copy link
Contributor

@Sanan07 Sanan07 left a comment

Choose a reason for hiding this comment

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

Partially reviewed, cause the change is big.
Will do rest of later :)

@nohwnd
Copy link
Member

nohwnd commented Sep 23, 2021

@nohwnd, the new tests are not committed yet, I have them on my local machine. Will do the commit once I have full test coverage, but it may take a while since writing comprehensive tests is a tedious endeavor.

Oh okay, I thought you just marked it as ready to review. But it was few days ago. Ping me when ready pls.

@cvpoienaru
Copy link
Member Author

@nohwnd now the tests are finally ready ... It's been a while but better late than never 😄

@nohwnd
Copy link
Member

nohwnd commented Nov 11, 2021

To solve those conflicts, you are probably just best of just grabbing all from master, and letting Roslyn analyzers to show you the compilation errors, I see you have few apis added to unshipped, and 1 changed in shipped (is that intentional?) Unless there are differences per TFM, the change should go into the files that are directly in the PublicAPI folder, because that file is common api for all tfms. If there is difference between netstandard1.0 and others, it should go to the file in net folder. Otherwise in the tfm specific folders.

@nohwnd
Copy link
Member

nohwnd commented Nov 11, 2021

If you need more help merging this, let me know.

@cvpoienaru
Copy link
Member Author

cvpoienaru commented Nov 12, 2021

To solve those conflicts, you are probably just best of just grabbing all from master, and letting Roslyn analyzers to show you the compilation errors, I see you have few apis added to unshipped, and 1 changed in shipped (is that intentional?) Unless there are differences per TFM, the change should go into the files that are directly in the PublicAPI folder, because that file is common api for all tfms. If there is difference between netstandard1.0 and others, it should go to the file in net folder. Otherwise in the tfm specific folders.

Thanks for the suggestion, @nohwnd, that's exactly what I did and it worked better than actually trying to solve the conflicts by 3-way merge. I also moved the unshipped APIs for each TFM in the unshipped file in the PublicAPI root folder as you suggested as they were not TFM specific in the first place.

Yes, the change in the shipped file is intentional. I have actually changed that API but it should be ok. Even though it's a public API it's not been publicly announced and I'm almost certain that no one uses it. On top of that it's in ITestPlatform and I'm not aware of anyone actually trying to implement their own TestPlatform class (and not sure it's even possible to detect such a custom implementation).

Btw, can you please approve the change if you find it acceptable ? For merging I also need your approval as a code owner for the PublicAPI part :)

Copy link
Contributor

@Haplois Haplois left a comment

Choose a reason for hiding this comment

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

LGTM, with some comments.

@cvpoienaru cvpoienaru merged commit 554938b into microsoft:main Nov 19, 2021
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.

Enable testhost sharing between discovery and execution
7 participants