Skip to content

DistributedFileLoggerParameters flaky test #13703

@rainersigwald

Description

@rainersigwald

In #13576, the test Microsoft.Build.UnitTests.FileLogger_Tests.DistributedFileLoggerParameters failed with the error

Microsoft.Build.Framework.LoggerException : Failed to write to log file "msbuild0.log". The process cannot access the file 'D:\a_work\1\s\artifacts\bin\Microsoft.Build.Engine.UnitTests\Release\net472\msbuild0.log' because it is being used by another process.
   at Microsoft.Build.Logging.FileLogger.InitializeFileLogger(IEventSource eventSource, Int32 nodeCount) in /_/src/Build/Logging/FileLogger.cs:line 128
   at Microsoft.Build.Logging.FileLogger.Initialize(IEventSource eventSource, Int32 nodeCount) in /_/src/Build/Logging/FileLogger.cs:line 137
   at Microsoft.Build.Logging.DistributedFileLogger.Initialize(IEventSource eventSource) in /_/src/Build/Logging/DistributedLoggers/DistributedFileLogger.cs:line 129
   at Microsoft.Build.UnitTests.FileLogger_Tests.DistributedFileLoggerParameters() in D:\a\_work\1\s\src\Build.UnitTests\FileLogger_Tests.cs:line 489

I think the absolute path being in the test bin folder is a tell about what's wrong--it should use a folder in TEMP via TestEnvironment.

Metadata

Metadata

Labels

Area: Terminal LoggerProblems with the livelogger/fancylogger/terminallogger -tl functionality.flaky-testTests that have failed but passed on rerun.

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions