Extension doesn't always compile code before running tests.

Open
#1,629 21 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, typescript, vscode
Domain
testing, tooling

Research direction

Reproduce the issue with the reported macOS 13.6, runner v0.40.0, and VS Code 1.83.1 setup. Start by tracing the sequence from clicking Run through file saving, compilation, and JUnit execution. Done means edited but previously unsaved code is compiled before tests run, so JUnit cannot execute stale code.

Written by the indexing model from the issue text.

Description

ai-triaged bug help wanted test-execution

If I edit code and don't save the file, running the tests sometimes executes the old code.
When I click run, the files are saved, but there seems to be a race between the compiler and JUnit. Sometimes the compiler wins and things are okay, sometimes I get false test failures because JUnit is running the old code.

This is on MacOS 13.6, v0.40.0 of the runner, and vscode 1.83.1

Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 2h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-java-test

All issues in microsoft/vscode-java-test

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.