Skip to content
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

[R-package] reduce verbosity in some unit tests #4879

Merged
merged 6 commits into from
Dec 18, 2021
Merged

Conversation

jameslamb
Copy link
Collaborator

Contributes to #4862.

This PR proposes the first batch of changes to reduce the verbosity of the R package tests. I only changed a few tests, as this PR is mainly focused on getting a review of the proposed approach.

How I Tested This

I used the following code to determine the impact of this change.

sh build-cran-package --no-build-vignettes
R CMD INSTALL --with-keep.source ./lightgbm_3.3.1.99.tar.gz
cd R-package/tests
Rscript testthat.R > ../../out.log 2>&1
echo "log lines from tests: $(cat ../../out.log | wc -l)"

On master, the R tests generate 3065 lines of logs.
As of this PR, that's reduced to 2984.

Why allow changing this with an environment variable?

I think it would be useful to occasionally see all LightGBM logs from tests.

That can help to catch issues like #4225 that don't show up as test errors.

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I like this approach, thanks!

@jameslamb jameslamb merged commit bd2e949 into master Dec 18, 2021
@jameslamb jameslamb deleted the r/less-verbose-tests branch December 18, 2021 05:28
@StrikerRUS StrikerRUS mentioned this pull request Jan 6, 2022
13 tasks
@jameslamb jameslamb mentioned this pull request Oct 7, 2022
40 tasks
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants