Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test execution sometimes hangs when running in Azure DevOps using dotnet test #1207

Open
stevozilik opened this issue Aug 29, 2024 · 1 comment

Comments

@stevozilik
Copy link

stevozilik commented Aug 29, 2024

Hi,

I've been experiencing NUnit tests getting stuck when running in Azure Devops yml pipeline using the dotnet test ... command

Background:

  • NUnit 4.1.0 (same behavior with previous versions)
  • NUnit3TestAdapter 4.6.0 (same behavior with previous versions)
  • Microsoft.NET.Test.Sdk 17.11.0 (same behavior with previous versions)
  • .Net 8
  • Azure DevOps running on ubuntu-latest or windows-latest (no difference)
  • SpecFlow.NUnit 3.9.74

Observed Behavior (test logs):

  • Test execution sometimes stops after one of the tests (inconsistent) and never completes. This is the log:
    ... legitimate test logs ...
    2024-08-29T13:55:41.6129069Z -> duration: ScenarioHooks.AfterScenario(): 1.0s
    2024-08-29T13:55:41.7389440Z
    **** Expected log line with the test outcome, observed in previous tests, consistently missing when the tests get stuck ***
    (missing) 2024-08-29T13:55:41.6858716Z Passed TestName [1 s]

    **** [note the time gap below, cancellation triggered by the job.timeoutInMinutes] ***
    2024-08-29T14:00:28.8388057Z ##[error]The Operation will be canceled. The next steps may not contain expected logs.
    2024-08-29T14:00:28.8557105Z ##[error]The operation was canceled.
    2024-08-29T14:00:28.8560745Z ##[section]Finishing: Running Tests

It looks like something gets stuck and I'm struggling to figure out where to even begin

similar dotnet test ... command testing the same assembly locally works consistently ok

I'd like to ask for help how to diagnose this to get to the bottom of why it gets stuck

I've tried adding --verbosity diag --logger "console;verbosity=detailed" -- "NUnit.Consoleout=1 NUnit.InternalTraceLevel=Debug NUnit.Verbosity=5" to the dotnet test ... command but nothing jumps out as helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@stevozilik and others