Skip to content

Commit

Permalink
More changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubch1 committed Jun 12, 2020
1 parent 7d7d8a1 commit 5ae0b3a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ public void HandleAttachements(ICollection<AttachmentSet> attachments, Cancellat
if (attachementUri != null)
{
var attachmentsToBeProcessed = attachments.Where(dataCollectionAttachment => attachementUri.Equals(dataCollectionAttachment.Uri)).ToArray();

foreach (var attachment in attachmentsToBeProcessed)
if(attachmentsToBeProcessed.Any())
{
attachments.Remove(attachment);
}
foreach (var attachment in attachmentsToBeProcessed)
{
attachments.Remove(attachment);
}

ICollection<AttachmentSet> processedAttachements = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection<AttachmentSet>(attachmentsToBeProcessed), cancellationToken);
foreach (var attachment in processedAttachements)
{
attachments.Add(attachment);
ICollection<AttachmentSet> processedAttachements = dataCollectorAttachmentsHandler.HandleDataCollectionAttachmentSets(new Collection<AttachmentSet>(attachmentsToBeProcessed), cancellationToken);
foreach (var attachment in processedAttachements)
{
attachments.Add(attachment);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ namespace Microsoft.VisualStudio.TestPlatform.CommunicationUtilities
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;

using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.EventHandlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.Adapter
public interface IFrameworkHandle : ITestExecutionRecorder, IMessageLogger
{
/// <summary>
/// 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
/// 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
/// and should be used only when absolutely required as using it degrades the performance of the subsequent run.
/// It throws InvalidOperationException when it is attempted to be enabled when keepAlive is false.
/// </summary>
Expand Down

0 comments on commit 5ae0b3a

Please sign in to comment.