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

why I can't cancel test #202561

Closed
iknownoth1ng opened this issue Jan 16, 2024 · 5 comments
Closed

why I can't cancel test #202561

iknownoth1ng opened this issue Jan 16, 2024 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@iknownoth1ng
Copy link

iknownoth1ng commented Jan 16, 2024

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

  • VS Code Version:
  • OS Version: windows 10
    Version: 1.85.1 (system setup)
    Commit: 0ee08df
    Date: 2023-12-13T09:49:37.021Z
    Electron: 25.9.7
    ElectronBuildId: 25551756
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.19045

Steps to Reproduce:

  1. run pytest
  2. cancel test, wait 5 minutes.
  3. didn't work
from rich.progress import track
.......
    try:
        execute_values(hologres_cursor, sql, track(add_data_list, f"{name}insert data:"))
        hologres_db.commit()
    except Exception:
        hologres_db.rollback()
        pytest.fail("fail")  

when I use rich to print progress bar
once pytest.fail
the cancel button cann't stop pytest run because rich's thread is still running~

https://github.com/microsoft/vscode/assets/54530758/9849db67-a0a7-46ce-8510-194333862836
image

@iknownoth1ng
Copy link
Author

20240116_154521.mp4

@IllusionMH
Copy link
Contributor

Have you checked if this is an issue with extension that provides test capabilities for python?

@iknownoth1ng
Copy link
Author

Have you checked if this is an issue with extension that provides test capabilities for python?

I hope pytest can stop run when clicked the cancel button
whatever if other threads are running

@IllusionMH
Copy link
Contributor

VS Code provides only interface and extensions provide test runner functionality.
Therefore, it should be first reported in extensions repo, unless it's clear that extension doesn't receive proper "event" from VS Code editor itself.

/duplicate of microsoft/vscode-python#22605

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 16, 2024
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants