ctongfei / progressbar

Terminal-based progress bar for Java / JVM
http://tongfei.me/progressbar/
MIT License
1.07k stars 102 forks source link

IntelliJ IDEA - Maven test run not showing progress bar #144

Open lppedd opened 1 year ago

lppedd commented 1 year ago

IntelliJ IDEA info:

IntelliJ IDEA 2022.2.2 (Ultimate Edition)
Build #IU-222.4167.29, built on September 13, 2022
Runtime version: 17.0.4+7-b469.53 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
Registry:
    lcd.contrast.value=225

The progress bar is always printed after the process terminates.

image

lppedd commented 1 year ago

Additional detail: happens only when ASCII style is used.

ctongfei commented 1 year ago

I am aware of this bug: the test window does not flush regularly. I have not found a way to make it work properly in the unit test windows of IntelliJ.

lppedd commented 1 year ago

@ctongfei FYI, since I need to test a CLI, I've changed the consumer of the progress bar to a "sequential one", meaning one that does not override the previous output. Sys.out.println works as expected, but not Sys.out.print.

ctongfei commented 1 year ago

Yes, it works if it is a "sequential one" but it'll look bad.

muyuanjin commented 5 months ago

IntelliJ —— Help | Edit Custom VM options and add the line -Deditable.java.test.console=true and restarting IntelliJ may be helpful. Another case is that if the cpu is busy, the progress bar refresh task may be unable to refresh the progress because it can't getting the CPU cycle.