microsoft / microsoft/vscode-java-test

CodeLens missing and individual method execution freezes on @Nested JUnit 6 classes (macOS)

Aperta
#1,897 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

ai-triaged bug investigating junit test-discovery test-execution
Lingua principale
TypeScript
Stelle
340
Fork
173
Merge medio
1g 19h
PR unite (30g)
18

Descrizione

Type: Bug

When using @Nested test classes in JUnit 5 (with Spring Boot @DataJpaTest / Testcontainers), the extension fails to render CodeLens buttons for inner classes and freezes when running individual nested test methods from the Test Explorer.

Environment
  • OS: macOS (zsh)
  • VS Code Extension: Test Runner for Java (vscjava.vscode-java-test)
  • Framework: Spring Boot + JUnit 5 + Testcontainers
Steps to Reproduce
  1. Create a main test class annotated with @DataJpaTest and @Import(TestcontainersConfiguration.class).
  2. Create inner classes annotated with @Nested and @DisplayName.
  3. Open the file in VS Code.
Expected Behavior
  1. CodeLens ("Run | Debug") should appear above @Nested inner classes and their @Test methods.
  2. Running a single @Test method from inside a @Nested class via the Test Explorer panel should execute cleanly.
Actual Behavior
  1. CodeLens buttons are missing above @Nested inner classes.
  2. Triggering a single test method inside @Nested from the Test Explorer hangs/freezes indefinitely (likely due to nested class $ delimiter escaping issues in macOS zsh or context inheritance failures).
Workaround attempted

Adding @NestedTestConfiguration(INHERIT) and setting spring.test.nested.class.execution=INHERIT did not prevent the runner from hanging when selecting individual nested methods.

Extension version: 0.46.0
VS Code version: Code 1.131.0 (e4c7e7b1d6d060162f4aa7f8225271b67ce1df75, 2026-07-28T10:51:25Z)
OS version: Darwin arm64 25.5.0
Modes:

System Info
Item Value
CPUs Apple M1 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M1 Pro, Version 26.5.2 (Build 25F84))], DRIVER_VENDOR=Apple, DRIVER_VERSION=26.5.2 ACTIVE
Machine model name: MacBookPro
Machine model version: 18.1
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 4, 4, 3
Memory (System) 16.00GB (0.08GB free)
Process Argv --crash-reporter-id 9d2ff9aa-dc31-484a-a943-bcece3ff6fb5
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
pythonvspyt551cf:31249601
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
cloudbuttont:31379625
3efgi100_wstrepl:31403338
839jf696:31457053
ec5jj548:31422691
cp_cls_t_966_ss:31526232
8hhj4413:31478653
cp_cls_t_1081:31454832
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
7e187181:31503455
ghj88844:31499326
ddid_c:31478207
hmra_i5g22:31518061
bjc72774_agent_sandbox:31557830
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
748c7209:31512887
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
jh5f2457_c:31540921
41836166:31537719
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
jf4hg949:31526829
ahp-both-windows:31556933
h561g132:31533256
sessions_3:31532893
ihg5j128:31534457
f412h606:31551416
7g2b5551:31542111
sandbox-ui-on-2:31543161
5fe6f778:31554331
allow-none:31555437
fd5dc207:31551400
c7c27ce7:31554789
8hc4g144:31558143
0dg73464:31554319
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
session-archive:31558132

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema nell’estensione vscode-java-test con un @DataJpaTest di Spring Boot che utilizza classi JUnit 5 annidate e Testcontainers su macOS. Inizia tracciando il comportamento di CodeLens e Test Explorer per le classi annidate; il lavoro è completato quando CodeLens viene visualizzato per le classi e i metodi annidati e l’esecuzione di un metodo annidato termina senza bloccarsi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, macos, spring-boot, typescript, vscode
Ambito
developer-experience, testing, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.