Skip to content

Commit

Permalink
Minor tweaks. Noticed the presence of MSBuild_Logs, which I haven't s…
Browse files Browse the repository at this point in the history
…een before -> not sure what that means and if it's an issue, but made reference to broken pipes.
  • Loading branch information
kkeirstead committed Aug 18, 2021
1 parent 3512c06 commit 820a580
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dotnet-monitor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Monit
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Monitoring.Tool.UnitTests", "src\Tests\Microsoft.Diagnostics.Monitoring.Tool.UnitTests\Microsoft.Diagnostics.Monitoring.Tool.UnitTests.csproj", "{0DBE362D-82F1-4740-AE6A-40C1A82EDCDB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Monitoring.ExecuteApp", "src\Tests\Microsoft.Diagnostics.Monitoring.ExecuteActionApp\Microsoft.Diagnostics.Monitoring.ExecuteApp.csproj", "{A5A0CAAB-C200-44D2-BC93-8445C6E748AD}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Diagnostics.Monitoring.ExecuteActionApp", "src\Tests\Microsoft.Diagnostics.Monitoring.ExecuteActionApp\Microsoft.Diagnostics.Monitoring.ExecuteActionApp.csproj", "{A5A0CAAB-C200-44D2-BC93-8445C6E748AD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.IO;
using System.Threading;

namespace Microsoft.Diagnostics.Monitoring.ExecuteApp
namespace Microsoft.Diagnostics.Monitoring.ExecuteActionApp
{
internal class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public async Task ExecuteAction_TokenCancellation()
options.Path = DotNetHost.HostExePath;
options.Arguments = GenerateArgumentsString(new string[] { "TokenCancellation" }); ;

TaskCanceledException invalidOperationException = await Assert.ThrowsAsync<TaskCanceledException>(
TaskCanceledException taskCanceledException = await Assert.ThrowsAsync<TaskCanceledException>(
() => action.ExecuteAsync(options, null, CreateCancellationToken()));

Assert.Contains(TaskCanceledMessage, invalidOperationException.Message);
Assert.Contains(TaskCanceledMessage, taskCanceledException.Message);
}

[Fact]
Expand Down Expand Up @@ -108,9 +108,7 @@ public async Task ExecuteAction_InvalidPath()
string uniquePathName = Guid.NewGuid().ToString();

options.Path = uniquePathName;
options.Arguments = Assembly.GetExecutingAssembly().Location.Replace(
Assembly.GetExecutingAssembly().GetName().Name,
"Microsoft.Diagnostics.Monitoring.ExecuteApp");
options.Arguments = GenerateArgumentsString(Array.Empty<string>());

FileNotFoundException fileNotFoundException = await Assert.ThrowsAsync<FileNotFoundException>(
() => action.ExecuteAsync(options, null, CreateCancellationToken()));
Expand All @@ -122,7 +120,7 @@ private static string GenerateArgumentsString(string[] additionalArgs)
{
return Assembly.GetExecutingAssembly().Location.Replace(
Assembly.GetExecutingAssembly().GetName().Name,
"Microsoft.Diagnostics.Monitoring.ExecuteApp") + ' ' + string.Join(' ', additionalArgs);
"Microsoft.Diagnostics.Monitoring.ExecuteActionApp") + ' ' + string.Join(' ', additionalArgs);
}

private static CancellationToken CreateCancellationToken()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public async Task<CollectionRuleActionResult> ExecuteAsync(ExecuteOptions option
using Process process = new Process();

process.StartInfo = new ProcessStartInfo(path, arguments);

process.EnableRaisingEvents = true;

// Completion source that is signaled when the process exits
Expand Down

This file was deleted.

0 comments on commit 820a580

Please sign in to comment.