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 runner shows 'canceled' dialog #347

Open
robaho opened this issue Dec 11, 2024 · 2 comments
Open

test runner shows 'canceled' dialog #347

robaho opened this issue Dec 11, 2024 · 2 comments
Labels
discussion General Discussion or clarification question

Comments

@robaho
Copy link

robaho commented Dec 11, 2024

Something has broken in a recent release.

When I run a Java test case, the following dialog appears and remains until a press the Cancel button. The test case runs fine, and the results appear correctly in the test tree.

image

I also get a notice in the lower right when this happens:

image

VSCode Version: 1.95.3 (Universal)
Java Extension version: v23.0.1
MacOS 13.7.1

@robaho robaho changed the title test runner shows 'cancelled dialog' test runner shows 'canceled' dialog Dec 11, 2024
@shivam71
Copy link
Member

shivam71 commented Dec 12, 2024

Thanks @robaho for pointing this out ! , you can resolve this issue for now by following the steps below :-

  1. Navigate to the Run Debug View in the side panel.
  2. Create a launch.json file for the project. More on launch configurations
  3. In case you don't see any configuration object with attribute "name": "Launch Java App" then use the
    Add Configuration... button appearing in the bottom right corner . Among the list of options you get when you click the button select Java+: Launch Java App(Reference image). Save the launch.json file.
  4. Now select the configuration named Launch Java App using the Configuration dropdown in the Run and Debug view . You should see Launch Java App in place of Launch Program with reference to this image .
  5. Now proceed to run your test.

Currently this issue is arising because while running the test the configuration selected in the Run and Debug view is used . (Perhaps in your case the Attach to Process was selected .) In future release we will fix this .

Let us know if this works for you .

@robaho
Copy link
Author

robaho commented Dec 12, 2024

I had the drop down set to 'Attach to Process'. Changed it to 'Launch Java App' and it worked. Thanks for the work-around.

@Achal1607 Achal1607 added the discussion General Discussion or clarification question label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion General Discussion or clarification question
Projects
None yet
Development

No branches or pull requests

3 participants