azure-pipelines-tasks: VSTest hangs

Environment

Hosted; https://github-editor-tools.visualstudio.com/VisualStudio/_build?definitionId=4

Issue Description

The VSTest task hangs after running all tests in about 1/3 builds. I’m not able to reproduce this running vstest.console.exe locally.

Task logs

Debug logs are as follows:

logs_158.zip

Note that I also enabled diagnosticsEnabled: true on the VSTest task but I don’t seem to be able to get to the logs it produced and cannot upload them as artifacts because the build needs to be cancelled as it hangs, causing the publish artifacts step to be skipped. Hints on how to get hold of this log file would be appreciated.

Error logs

Nothing really to see here. The relevant lines are:

2018-11-14T10:53:41.5003002Z Passed   RepoChangedHandlesNullRepository
2018-11-14T10:57:27.3560119Z ##[debug]Re-evaluate condition on job cancellation for step: 'VSTest'.
2018-11-14T10:57:27.3770467Z ##[section]Finishing: VSTest

You can see that the last test passed, then the agent hung for ~4 minutes until I cancelled it.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, here is a test run that has failed:

https://github-editor-tools.visualstudio.com/VisualStudio/_build/results?buildId=608

You can see that VSTest timed out correctly after two minutes:

Total tests: Unknown. Passed: 960. Failed: 0. Skipped: 3.
Test Run Aborted.
Test execution time: 2.0004 Minutes

However the build continued to run (still running as I’m writing this) in a hung state.

@manu4rhyme, regarding selenium tests this issue might prove more useful to you