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 more issues with parallel discovery and cancellation #3605

Merged
merged 19 commits into from
May 9, 2022

Conversation

Evangelink
Copy link
Member

@Evangelink Evangelink commented Apr 25, 2022

Description

Fix more issues with parallel discovery and cancellation.

I suggest to review commit per commit.

Related issue

AB#1526089

@@ -387,3 +387,4 @@ Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel.Discovery
Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestSender.SendDiscoveryAbort() -> void
Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel.DiscoveryCompletePayload.DiscoveredExtensions.get -> System.Collections.Generic.Dictionary<string, System.Collections.Generic.HashSet<string>>
Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel.DiscoveryCompletePayload.DiscoveredExtensions.set -> void
static Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.Resources.Resources.AbortedTestDiscoveryWithReason.get -> string
Copy link
Member Author

Choose a reason for hiding this comment

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

No need to be public but I would prefer to do a follow-up PR where we would change the accessibility of all these resources (except if we expect some usage) to be internal.

@@ -13,6 +13,11 @@
<target state="translated">Vzdálený hostitel vynutil ukončení existujícího připojení.</target>
</trans-unit>
<trans-unit id="AbortedTestDiscovery">
<source>The active test discovery was aborted.</source>
<note></note>
<target state="translated">Aktivní zjišťování testu se přerušilo.</target>
Copy link
Member Author

Choose a reason for hiding this comment

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

Added the .xlf as already translated as I am only adding a resource removing a sub sentence.

@@ -139,8 +139,14 @@ public void DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEve

_baseTestDiscoveryEventsHandler = eventHandler;

// Mark all sources as NotDiscovered before actual discovery starts
_discoveryDataAggregator.MarkSourcesWithStatus(discoverySources, DiscoveryStatus.NotDiscovered);
// Do not mark sources as not discovered, this is already done in the
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that marking source as not discovered would change nothing so maybe I could remove my comment.

Evangelink and others added 19 commits May 9, 2022 09:32
Ensure source with no test is marked as fully discovered on discovery complete.
Ensure that all sources of a discovery request are marked as not discovered even if some abort was to occur before all proxy managers were instantiated.
Before this we were printing "The active test discovery was aborted. Reason: Test host process crashed" which could be confusing because this abort was expected and not due to some crash. After the change we will print only the 1st part of the message.
Co-authored-by: Jakub Jareš <me@jakubjares.com>
…arallel/DiscoveryDataAggregatorTests.cs

Co-authored-by: Jakub Jareš <me@jakubjares.com>
Co-authored-by: Shyam N <shyamnamboodiripad@users.noreply.github.com>
Consider discovery as aborted if upon completion any source is not fully discovered
@Evangelink Evangelink enabled auto-merge (squash) May 9, 2022 19:52
@Evangelink Evangelink merged commit dcb7c15 into microsoft:main May 9, 2022
@Evangelink Evangelink deleted the discovery branch May 9, 2022 19:55
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.

4 participants