Skip to content

Test explorer does not handle panics or timeouts well #1864

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

Open
firelizzard18 opened this issue Oct 29, 2021 · 5 comments
Open

Test explorer does not handle panics or timeouts well #1864

firelizzard18 opened this issue Oct 29, 2021 · 5 comments
Labels
go-test issues related to go test support (test output, test explorer, ...)

Comments

@firelizzard18
Copy link
Contributor

What version of Go, VS Code & VS Code Go extension are you using?

  • go version go1.17.1 linux/amd64
  • Nightly vscode-go v2021.10.2813

Describe the bug

When the user runs a test or tests in the test explorer and one of those tests panics or times out, all tests that have not already completed, including the one that panicked or timed out, are reported as skipped.

This is a problem with GoTestRunner.

Steps to reproduce the behavior:

  1. Create a test that panics or times out
  2. Run the test
  3. Tests show as skipped

Screenshots or recordings

test skipped
test panic

@gopherbot gopherbot added this to the Untriaged milestone Oct 29, 2021
@findleyr findleyr modified the milestones: Untriaged, Unplanned Oct 29, 2021
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/373214 mentions this issue: src/goTest: fail tests if the package fails

@mgabeler-lee-6rs
Copy link

Anything that can be done to move this along? Got super confused & then frustrated by this problem recently.

I see @hyangah had some questions, but @firelizzard18 appears to have answered them ... but then also noted the CL as abandoned.

@firelizzard18
Copy link
Contributor Author

@mgabeler-lee-6rs My day job leaves me with very little capacity to make contributions to other projects. If someone wants to submit a new CL based on my work, I would support that.

@mgabeler-lee-6rs
Copy link

Understood. I was more hoping the maintainers of this project would be able to pick things up and move this forwards :)

@hyangah hyangah added the go-test issues related to go test support (test output, test explorer, ...) label Dec 5, 2023
@firelizzard18
Copy link
Contributor Author

My original solution (in that CL) was kind of a hack. It may be more feasible to fix this properly once golang/go#62728 has been resolved. Though I'm not sure that will handle panics well. But we might be able to add a different output type for panics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go-test issues related to go test support (test output, test explorer, ...)
Projects
Status: No status
Development

No branches or pull requests

5 participants