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 item doesn't show as busy after setting its busy field #154659

Closed
KaravolisL opened this issue Jul 9, 2022 · 8 comments · Fixed by #159714 or #162898
Closed

Test item doesn't show as busy after setting its busy field #154659

KaravolisL opened this issue Jul 9, 2022 · 8 comments · Fixed by #159714 or #162898
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verified Verification succeeded
Milestone

Comments

@KaravolisL
Copy link

Does this issue occur when all extensions are disabled?: Yes

Version: 1.69.0 (user setup)
Commit: 92d25e3
Date: 2022-07-07T05:28:36.503Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Windows_NT x64 10.0.19043

I've created a simple test extension to reproduce this issue. The code is located here: https://github.com/KaravolisL/simple-test-extension. In particular, see https://github.com/KaravolisL/simple-test-extension/blob/0cb1a52d8f4b0fccc34e9b7a7dc8ed0e6308dd24/src/extension.ts#L45.

Inside of a run profile's run handler, I can call test.busy = true; and the test will show as busy in the user interface. Calling test.busy = false; returns the user interface to its idle state. This is the expected behavior.

The unexpected behavior is when I try to do this in a separate command that gets registered in the package.json under "testing/item/context". The call test.busy = true; doesn't seem to do anything in this case.

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug testing Built-in testing support labels Jul 11, 2022
@KaravolisL
Copy link
Author

I think I found an issue that may be related to this issue. I'm trying to keep additional data associated with every TestItem in a weak map like is suggested here: https://code.visualstudio.com/api/extension-guides/testing. When a test is run, I'm adding to the test item and its value to the weak map. In my separate command that's registered in the package.json, I'm trying to get that associated data using the TestItem parameter, but it's not being found. I updated the repository linked above with console.logs to demonstrate this

connor4312 added a commit that referenced this issue Aug 31, 2022
Fixes #154659

I think I never just hooked this up
connor4312 added a commit that referenced this issue Aug 31, 2022
Fixes #154659

I think I never just hooked this up
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Aug 31, 2022
@VSCodeTriageBot VSCodeTriageBot added this to the September 2022 milestone Aug 31, 2022
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 2, 2022
@roblourens
Copy link
Member

I ran the example extension, and when I click the squirrel, the test does not show the busy state. Is that what changed? Can you verify it @KaravolisL?

@roblourens roblourens added verification-steps-needed Steps to verify are needed for verification author-verification-requested Issues potentially verifiable by issue author labels Sep 29, 2022
@VSCodeTriageBot
Copy link
Collaborator

This bug has been fixed in the latest release of VS Code Insiders!

@KaravolisL, you can help us out by commenting /verified if things are now working as expected.

If things still don't seem right, please ensure you're on version 2c80125 of Insiders (today's or later - you can use Help: About in the command palette to check), and leave a comment letting us know what isn't working as expected.

Happy Coding!

@mjbvz
Copy link
Contributor

mjbvz commented Oct 4, 2022

@connor4312 Can you please provides steps to verify this if we don't hear back from @KaravolisL

@KaravolisL
Copy link
Author

@connor4312 This issue is still present in the following version

Version: 1.72.0-insider (user setup)
Commit: 9fb452c
Date: 2022-10-03T07:34:58.711Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19043
Sandboxed: Yes

Using the example extension linked above, I clicked the squirrel button on the test item and the busy state is still not shown. Additionally, the test item still isn't being retrieved from a WeakMap after it's been added

@connor4312
Copy link
Member

Ah, I fixed an issue that setting the busy state on any generic test item didn't update in the UI. But it seems, particularly in the followup comment, that you've a different problem in that the test items in actions are different instances.

I'm not sure this is something we'll fix, but I'll reopen for investigation

@connor4312 connor4312 reopened this Oct 4, 2022
@VSCodeTriageBot VSCodeTriageBot removed the insiders-released Patch has been released in VS Code Insiders label Oct 4, 2022
connor4312 added a commit that referenced this issue Oct 6, 2022
@connor4312 connor4312 removed the verification-steps-needed Steps to verify are needed for verification label Oct 6, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Oct 6, 2022
@VSCodeTriageBot VSCodeTriageBot added the insiders-released Patch has been released in VS Code Insiders label Oct 7, 2022
@KaravolisL
Copy link
Author

Tested with:

Version: 1.73.0-insider (user setup)
Commit: fad3a77
Date: 2022-10-07T05:18:17.049Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19043
Sandboxed: Yes

Everything seems to be working now

@KaravolisL
Copy link
Author

/verified

@VSCodeTriageBot VSCodeTriageBot added verified Verification succeeded and removed author-verification-requested Issues potentially verifiable by issue author labels Oct 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verified Verification succeeded
Projects
None yet
5 participants