question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnityTestTask 1.4.2 stalls indefinitely

See original GitHub issue

UnityTestTask@1.4.2 stalls our pipeline indefinitely. The Unity log reaches the end, but the task never appears to detect that Unity quit. With diagnostics logging enabled, it is logged that Unity quits with exit code 0. Looking at the taks manager on the build machine, node appears to still be running unitl the job is canceled. Pinning the test tasks to 1.4.0 works and allows the pipeline to finish.

This happens for both Unity 2019.3.6f1 and Unity 2020.3.3f1.

I’m afraid I cannot say why exactly this is. It seems suspicious that the return code check changed, but looking at the diff it looks like it should not make a difference to me. Then again, I’m not very versed in TypeScript, so there may be a subtle difference in semantics I’m not seeing.

I have not tested whether this behaves differently (as in, does not stall) in case any tests fail. If this would be helpful information, let me know and I’ll look into it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
FejZacommented, Apr 23, 2021

Please note there is a new input variable for the Test Task:

failOnTestFail: It defaults to true and will make the pipeline fail if any of the tests fail. Set it to false to have the pipeline continue with subsequent tasks even if tests failed.

You can then use the new output variable testsFailed to know in subsequent tasks whether any tests have failed and decide what to do e.g.

1reaction
fnueckecommented, Apr 21, 2021

Oh, that definitely sounds related! Sorry, I missed that issue.

Here’s the relevant task from our pipeline .yml:

  - task: UnityTestTask@1.4.0
    displayName: 'Editor Tests Development'
    inputs:
      unityEditorsPathMode: 'specify'
      customUnityEditorsPath: 'C:\Program Files\Unity\'
      unityProjectPath: 'Development'
      testResultsPath: 'TestResults'
      testCategory: 'CPU'

The @1.4.0 being what we use to work around the issue for now. Previously was just @1, so latest, so 1.4.2.

Edit: also, for completeness, the worker is a Windows box.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unity Test Task does not finish · Issue #136 - GitHub
Hi, When executing the Unity Test Task, it runs in a timeout everytime. Obviously, no error occurs in the ... UnityTestTask 1.4.2 stalls...
Read more >
unity-azure-pipelines-tasks - bytemeta
Unity Build Task runs forever after `BuildPlayer` C# call completes. johannesvollmer ... UnityTestTask 1.4.2 stalls indefinitely. fnuecke.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found