progressbar
progressbar copied to clipboard
IntelliJ IDEA - Maven test run not showing progress bar
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.

Additional detail: happens only when ASCII style is used.
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.
@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.
Yes, it works if it is a "sequential one" but it'll look bad.
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.