Visual Studio Test task fails with System.IO.FileNotFoundException on temp file when run Impacted tests is enabled.
See original GitHub issueType: Bug
Task Name: Visual Studio Test
Environment
-
Server - Azure Pipelines
-
Agent - Hosted:
-
OS: Windows Server 2016 Standard
-
Visual Studio Version: 2019
-
Agent Version: 2.155.1
-
Issue Description
The task has started failing every time it runs. It started failing when the pipeline auto-updated the task from version 2.159.1 to version 2.160.2.
The log for this task shows it failing with a System.IO.FileNotFoundException:
Task logs
Error logs
##[error]Error occured while executing System.IO.FileNotFoundException: Could not find file 'E:\agentG2\_work\_temp\m0umztbldww.tmp'. File name: 'E:\agentG2\_work\_temp\m0umztbldww.tmp' at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding) at System.IO.File.InternalReadAllLines(String path, Encoding encoding) at MS.VS.TestService.VstestConsoleAdapter.TestSelectorCommandInputs.GetTestsList(String listTestsFile) at MS.VS.TestService.VstestConsoleAdapter.TestSelectorCommandInputs.GetImpactedTestsCommandInput(VstestConsoleRunContext testRunContext) at MS.VS.TestService.VstestConsoleAdapter.ExecutionStateResolver.GetNextPhase(VstestConsoleRunContext consoleRunContext, ITestRunPhase currentPhase, ITestRunPhaseResults phaseResult) Completed TestExecution Model... ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests. ##[error]Error: The process 'E:\agentG2\_work\_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.160.2\Modules\DTAExecutionHost.exe' failed with exit code 1 ##[error]Vstest failed with error. Check logs for failures. There might be failed tests. ##[section]Finishing: VsTest - testAssemblies x86
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:16 (6 by maintainers)
Top GitHub Comments
Running into the same error. I have 6 test tasks in a pipeline and this was happening to two of them - the ones that had “Run only impacted tests” checked. Unchecked that and now the test tasks don’t error out.
I gave it a go and can confirm v2.160.4 works as expected while looking for impacted tests again :