Skip to content

Commit 9b50f51

Browse files
committed
fix(tests): disable MSBuild node reuse for processes spawned by the test suite
ExecProcessWithLambdas (FakeLib 4.64.17) ends with an unbounded WaitForExit() that the 7-minute timeout above it does not cover: IL_020b: WaitForExit(int32) // the timeout IL_0217: Kill() // "Process %s %s timed out." IL_02b0: WaitForExit() // unbounded, after IL_02b6: get_ExitCode() That call returns only once the redirected streams reach EOF. With node reuse on, dotnet build/run/pack leave MSBuild worker nodes behind holding the inherited stdout and stderr handles, so EOF never comes and the run hangs with no output -- which is why PROCESS TIMED OUT never appeared in the log. ConditionSpecs is the only fixture that nests dotnet run and dotnet pack, and it is where the Windows run stops.
1 parent be223af commit 9b50f51

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

integrationtests/Paket.IntegrationTests/TestHelper.fs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@ let directToolEx env isPaket toolInfo commands workingDir =
139139
#else
140140
Environment.SetEnvironmentVariable("PAKET_DETAILED_ERRORS", "true")
141141
Environment.SetEnvironmentVariable("PAKET_DETAILED_WARNINGS", "true")
142+
// ExecProcessWithLambdas ends with an unbounded WaitForExit(), which returns only once the
143+
// redirected streams reach EOF -- the timeout below does not cover it. With node reuse on,
144+
// `dotnet build/run/pack` leaves MSBuild worker nodes behind that inherit those handles, so
145+
// EOF never comes and the run hangs silently. Children inherit this variable.
146+
Environment.SetEnvironmentVariable("MSBUILDDISABLENODEREUSE", "1")
142147
printfn "%s> %s %s" workingDir (if isPaket then "paket" else processFilename) processArgs
143148
let perfMessages = ResizeArray()
144149
let msgs = ResizeArray<OutputMsg>()

0 commit comments

Comments
 (0)