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

Introduce new properties for correct discovery completion #2903

Closed
Sanan07 opened this issue May 13, 2021 · 3 comments
Closed

Introduce new properties for correct discovery completion #2903

Sanan07 opened this issue May 13, 2021 · 3 comments

Comments

@Sanan07
Copy link
Contributor

Sanan07 commented May 13, 2021

Description

  1. Re-introduce properties for FullyDiscoveredSources, PartiallyDiscoveredSources and NotDiscoveredSources in DiscoveryCompleteEventArgs.
  2. Add logic to test host to handle parallel discovery. Since parallel discovery happens at a source level and since each test host is only discovering one source at a time, we should be able to do this by tracking the TestCases being returned from adapter and marking a source as ‘FullyDiscovered’ when we see that the source for a TestCase is not the same as that for the previous TestCase. All sources can start off as ‘NotDiscovered’ and a source can be marked ‘PartiallyDiscovered’ when we receive first TestCase for this source from adapter.
  3. This will require to bump up the protocol version, since old test hosts (referenced from .NET Core test projects that reference old version of Test SDK package) will not support the logic in 2.
  4. If test host does not support the above (i.e. if protocol version is older):
    o We will run discovery sequentially even if the supplied .runsettings from user’s solution specifies a MaxCpuCount node. This means, test console will need a change to ignore / remove the MaxCpuCount node.
    o In this case, test console will also need similar change as 2 above to decide when a source is `FullyDiscovered’. Only difference may be that it would need to track the discovery completion by looking inside the sequential TestCase chunks it receives from the test host.

Corner cases:
• A source can technically contain tests that can be discovered by multiple adapters (e.g. both xUnit and MSTest tests in the same binary). It would be great to support this if this is feasible and easy – but we could say that this is an unsupported scenario given we haven’t heard much about such cases in feedback.

Partially implemented #

@Sanan07 Sanan07 added this to the 17.0 milestone May 13, 2021
@Sanan07 Sanan07 self-assigned this May 13, 2021
@shyamnamboodiripad
Copy link
Contributor

Note: This work is a pre-requisite for correctly supporting parallel discovery.

@shyamnamboodiripad
Copy link
Contributor

fyi @Haplois

@Sanan07 Sanan07 modified the milestones: 17.0, 17.1 Nov 1, 2021
@Sanan07 Sanan07 assigned drognanar and unassigned Sanan07 Dec 21, 2021
@Evangelink Evangelink added needs-triage This item should be discussed in the next triage meeting. and removed needs-triage This item should be discussed in the next triage meeting. labels Aug 1, 2022
@Evangelink
Copy link
Member

Closed by #3349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants