vscode: Test API: createWorkspaceTestRoot is called twice for the same workspace if createDocumentTestRoot method is not defined on the TestController
Issue Type: Bug
When adapting the markdown test sample, createWorkspaceTestRoot is being called twice by the API for the same workspace in my adapted example: https://github.com/JustinGrote/vscode-pester-test-adapter/commit/aeefebfc0e8ae6ad42a8788d9672bec7268c72a1
While this in and of itself seems “fine”, it leads to duplicate event handlers getting registered for the create action, and the create action fails when the second one gets fired.
I could have duplicate event registration detection I suppose but seems it’s better to just find out why its getting called twice when the root document should still be in “resolved” state.
Stack Trace for First and Second Calls (second appears to be from an additional anonymous method)
VS Code version: Code - Insiders 1.58.0-insider (e1161be26874f0d39a5b9cdeb2c5fbfd4f83bb80, 2021-06-14T05:13:55.029Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | AMD Ryzen 7 4700U with Radeon Graphics (8 x 1996) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 15.36GB (4.51GB free) |
Process Argv | –crash-reporter-id 4453efaa-0821-4555-88e2-3de8bad9109e |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
pythonvspyt602:30291494
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt639:30291487
pythontb:30258533
vspre833cf:30267465
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscus158cf:30286554
pythonvsuse255:30319630
vscgsv2:30305091
vscorehov:30301224
vscod805:30301674
vscextlang:30310088
vsccppwtct:30312693
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (15 by maintainers)
We’ll actually be reworking the API a little bit and removing these methods soon. Watch https://github.com/microsoft/vscode/issues/122208 for details. (Don’t worry, the migration should not be very hard, and there’ll be a short guide.)
Should be fixed in tomorrow’s build