microsoft / microsoft/nodejstools
Avoid accessing IVs apis off of the UI thread
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 355
- PR merge metrics
- No merged PRs in 30d
Description
When the Test Explorer requests for a list of test containers from the test adapters through a property, the nodejs adapter calls IVs APIs to retrieve necessary information, but doesn't do so after switching to the UI thread which can cause deadlocks.
It is recommended that the thread should instead be switched to the UI thread using JTF.SwitchToMainThreadAsync before accessing the IVs APIs and switched off of it using await Task.Default when done,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Nodejs/Product/TestAdapterImpl/TestContainerDiscoverer.cs around line 244, where the nodejs adapter accesses IVs APIs while discovering test containers. Read the surrounding discovery flow and the JTF.SwitchToMainThreadAsync guidance first. Done means IVs API access occurs on the UI thread and the work switches off it with await Task.Default afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100