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

Can't run test in Azure with 17.6 latest VS test platform #4467

Closed
pshilpa1 opened this issue May 18, 2023 · 12 comments · Fixed by #4475
Closed

Can't run test in Azure with 17.6 latest VS test platform #4467

pshilpa1 opened this issue May 18, 2023 · 12 comments · Fixed by #4475
Assignees
Labels
exp: vsts-task external needs-triage This item should be discussed in the next triage meeting.

Comments

@pshilpa1
Copy link

pshilpa1 commented May 18, 2023

Description

Steps to reproduce

  1. Azure Taskgroup is using latest stable VsTest installer
    image
  2. Run the test suite
  3. It can't identify test scripts and can't run any automated test scripts and I had to cancel run after waiting for 30 mins

image

Expected behavior

Actual behavior

Can't identify tests and run is stuck until cancelled

Diagnostic logs

Working run with older version
image

Environment

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage This item should be discussed in the next triage meeting. label May 18, 2023
@Evangelink
Copy link
Member

Hi @pshilpa1,

Could you please let us know if you moved from 17.5 to 17.6 or if you did a bigger jump? Also, would it be possible to know what is the target framework of your test projects?

@pshilpa1
Copy link
Author

pshilpa1 commented May 18, 2023

We set it up in Azure to use latest stable so , 17.5 to 17.6
Target framework is .NET Framework4.8 for all test projects.

Thanks

@Evangelink
Copy link
Member

If you try to run vstest.console.exe 17.6 locally, are you reproducing the issue or is it only reproducing through the vstest task on AzDo?

@pshilpa1
Copy link
Author

Locally works fine , issue is only through Azure.

@jeromelaban
Copy link

jeromelaban commented May 18, 2023

nohwnd: Moved this to #4469.


I'm having a similar issue, and the build fails with the following trace running in Azure Devops hosted agents:

##[error]DiscoveryMessage : System.InvalidOperationException: The provided manager was not found in any slot.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.ClearCompletedSlot(TManager completedManager)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ParallelOperationManager`3.RunNextWork(TManager completedManager)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelProxyDiscoveryManager.HandlePartialDiscoveryComplete(IProxyDiscoveryManager proxyDiscoveryManager, Int64 totalTests, IEnumerable`1 lastChunk, Boolean isAborted)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.Parallel.ParallelDiscoveryEventsHandler.HandleDiscoveryComplete(DiscoveryCompleteEventArgs discoveryCompleteEventArgs, IEnumerable`1 lastChunk)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.InitializeDiscovery(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler, Boolean skipDefaultAdapters)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)

The issue started when moving from 17.5 to 17.6 two days ago.

@nohwnd
Copy link
Member

nohwnd commented May 22, 2023

@pshilpa1 is that a distributed run?

@nohwnd
Copy link
Member

nohwnd commented May 22, 2023

I've tried multiple approaches but I can't repro. What is the configuration of your vstest task?

@nohwnd
Copy link
Member

nohwnd commented May 22, 2023

Ok can repro even locally now.

@nohwnd
Copy link
Member

nohwnd commented May 22, 2023

Workaround should be to make the dll selection narrower by changing the assembly filter to be specific to your test assembly names. Eg if all your tests are suffixed with UnitTests.dll or Tests.dll then you select just those from bin: #3939

@nohwnd
Copy link
Member

nohwnd commented May 22, 2023

I can also confirm this is working in 17.5

@nohwnd
Copy link
Member

nohwnd commented May 23, 2023

Merged into 17.6 and main. Insertion into dotnet/sdk 7.0.3xx that is shipping 17.6 is pending here: dotnet/sdk#32755.

@nohwnd
Copy link
Member

nohwnd commented Jun 5, 2023

#4516 workarounds summarized here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp: vsts-task external needs-triage This item should be discussed in the next triage meeting.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants