microsoft / microsoft/vscode-java-test

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.

ai-triaged bug help wanted test-execution
Dominant language
TypeScript
Stars
340
Forks
173
Avg merge
1d 19h
Merged PRs (30d)
18

Description

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

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.