From e32b169def20b037c415ef2b3160e67f81a84e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Mon, 27 Nov 2023 18:39:05 +0100 Subject: [PATCH] Fix typo in cancellation message (#4769) --- .../ProcDumpDumper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs index 8aef1bdd46..a4130d6d2c 100644 --- a/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs +++ b/src/Microsoft.TestPlatform.Extensions.BlameDataCollector/ProcDumpDumper.cs @@ -205,8 +205,9 @@ public void DetachFromTargetProcess(int targetProcessId) // But not all versions of procdump have that parameter (definitely not the one we are getting from the Procdump 0.0.1 nuget package), and it works reliably. // What was not reliable before was that we sent the message and immediately killed procdump, that caused testhost to crash occasionally, because procdump was not detached, // and killing the process when it is not detached takes the observed process with it. - new Win32NamedEvent($"Procdump-{targetProcessId}").Set(); - EqtTrace.Info($"ProcDumpDumper.DetachFromTargetProcess: Cancel event was sent to Procdump."); + var eventName = $"ProcDump-{targetProcessId}"; + new Win32NamedEvent(eventName).Set(); + EqtTrace.Info($"ProcDumpDumper.DetachFromTargetProcess: Cancel event '{eventName}' was sent to Procdump."); var sw = Stopwatch.StartNew(); var exited = _procDumpProcess.WaitForExit(_timeout);