-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print pending groups in-line and include their reason, also add progress bar to the runner #9796
Conversation
I can revert this if anyone objects. The rationale for me is that it is easier to find tests in my code if they have the same ordering in the report - there is a 'spatial' analogy between both. I was finding it much harder to find tests after the ordering was changed. We could add an option to randomize the ordering on CI if requested. |
I really wanted this for a long time. Now it is clearer how the execution is progressing and if execution is stuck on a specific test case. progress-bar.mp4 |
# If ANSI colors are enabled, we assume an interactive terminal and will print progress | ||
progress_reporter = case config.use_ansi_colors of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit smelly: I'm overriding the meaning of use_ansi_colors
to generally mean that the application is run in an 'interactive' terminal session.
Shall we rename this setting to interactive_terminal
? It also does not have the same meaning.
We could introduce a separate setting for this but I think that is adding unnecessary complication - in general both colors and progress bars are going to be used in the same setting - on a dev machine, but not on CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interactive_terminal
definitely sounds more appropriate.
in general both colors and progress bars are going to be used in the same setting - on a dev machine, but not on CI.
Colors are used on the CI. And I think that in helps with readability. At least it helps to me. I would like to retain the colors on the CI, and not print the progress bar on the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was somehow sure that colors are not used on CI. My mistake. Of course the progress bar should not run on CI. I will try a different approach then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Progress reporting looks cool and useful. I had no idea one can implement that with such ease. Printing reasons for pending tests is also useful. Bringing back the original ordering by assembling the filtered tests into a nested list, rather than via Map
is also OK. I would only like the coloring to be retained on the CI, but not print any progress bar, obivously.
# If ANSI colors are enabled, we assume an interactive terminal and will print progress | ||
progress_reporter = case config.use_ansi_colors of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interactive_terminal
definitely sounds more appropriate.
in general both colors and progress bars are going to be used in the same setting - on a dev machine, but not on CI.
Colors are used on the CI. And I think that in helps with readability. At least it helps to me. I would like to retain the colors on the CI, and not print the progress bar on the CI.
Java_System.out.print '\r' | ||
|
||
## PRIVATE | ||
type Ignore_Progress_Reporter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that Ignore_Progress_Reporter
is used on the CI, but the coloring is still there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 7aeecf2 I have changed it so that the progress bar is displayed if System.console() != null
. This should be enough to avoid it running on CI or piped and better than adding yet another env var.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Description
Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.