Skip to content

Commit 5ae0b3a

Browse files
committed
More changes
1 parent 7d7d8a1 commit 5ae0b3a

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

src/Microsoft.TestPlatform.CrossPlatEngine/DataCollection/DataCollectorAttachmentsHandler.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ public void HandleAttachements(ICollection<AttachmentSet> attachments, Cancellat
2828
if (attachementUri != null)
2929
{
3030
var attachmentsToBeProcessed = attachments.Where(dataCollectionAttachment => attachementUri.Equals(dataCollectionAttachment.Uri)).ToArray();
31-
32-
foreach (var attachment in attachmentsToBeProcessed)
31+
if(attachmentsToBeProcessed.Any())
3332
{
34-
attachments.Remove(attachment);
35-
}
33+
foreach (var attachment in attachmentsToBeProcessed)
34+
{
35+
attachments.Remove(attachment);
36+
}
3637

37-
ICollection<AttachmentSet> processedAttachements = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection<AttachmentSet>(attachmentsToBeProcessed), cancellationToken);
38-
foreach (var attachment in processedAttachements)
39-
{
40-
attachments.Add(attachment);
38+
ICollection<AttachmentSet> processedAttachements = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection<AttachmentSet>(attachmentsToBeProcessed), cancellationToken);
39+
foreach (var attachment in processedAttachements)
40+
{
41+
attachments.Add(attachment);
42+
}
4143
}
4244
}
4345
}

src/Microsoft.TestPlatform.CrossPlatEngine/EventHandlers/TestRequestHandler.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
55
{
66
using System;
77
using System.Collections.Generic;
8-
using System.Linq;
98
using System.Threading;
109

1110
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.EventHandlers;

src/Microsoft.TestPlatform.ObjectModel/Adapter/Interfaces/IFrameworkHandle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter
1212
public interface IFrameworkHandle : ITestExecutionRecorder, IMessageLogger
1313
{
1414
/// <summary>
15-
/// Gets or sets a value indicating whether the execution framework enables the shutdown of execution process after the test run is complete. This should be used only in out of process test run when IRunContext.KeepAlive is true
15+
/// Gets or sets a value indicating whether the execution framework enables the shutdown of execution process after the test run is complete. This should be used only in out of process test runs when IRunContext.KeepAlive is true
1616
/// and should be used only when absolutely required as using it degrades the performance of the subsequent run.
1717
/// It throws InvalidOperationException when it is attempted to be enabled when keepAlive is false.
1818
/// </summary>

0 commit comments

Comments
 (0)