Skip to content

Remove outdated logging + fix the test#12607

Merged
YuliiaKovalova merged 3 commits intomainfrom
dev/ykovalova/fix_test
Oct 6, 2025
Merged

Remove outdated logging + fix the test#12607
YuliiaKovalova merged 3 commits intomainfrom
dev/ykovalova/fix_test

Conversation

@YuliiaKovalova
Copy link
Member

This change is related to the fix https://github.com/dotnet/msbuild/pull/12416/files - ProcessTracker shouldn't be needed now.
It wasn't visible due to try/catch and while I was investigating the failure, I realized the gap.

Unhandled exception. System.InvalidOperationException: Process was not started by this object, so requested information cannot be determined. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_ExitCode() at Microsoft.Build.Engine.UnitTests.BackEnd.TaskHostFactory_Tests.ProcessTracker.<>c__DisplayClass1_1.<AttachToProcess>b__0(Object sender, EventArgs e) in /home/vsts/work/1/s/src/Build.UnitTests/BackEnd/TaskHostFactory_Tests.cs:line 366 at System.Diagnostics.Process.RaiseOnExited() at System.Diagnostics.Process.CompletionCallback(Object waitHandleContext, Boolean wasSignaled) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.CompleteWaitThreadPoolWorkItem.System.Threading.IThreadPoolWorkItem.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback()

Copilot AI review requested due to automatic review settings October 6, 2025 13:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes outdated process tracking code and fixes a test that was experiencing unhandled exceptions. The main purpose is to clean up debugging infrastructure that is no longer needed after a previous fix and address test failures caused by improper process lifecycle management.

  • Removes the entire ProcessTracker helper class and its usage from test methods
  • Simplifies test execution by removing try/catch blocks that were masking the real issue
  • Updates the build execution pattern to use BuildManager with proper parameters

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@YuliiaKovalova YuliiaKovalova self-assigned this Oct 6, 2025
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.

3 participants