HyukjinKwon commented on a change in pull request #29456:
URL: https://github.com/apache/spark/pull/29456#discussion_r471925546
##########
File path: R/pkg/tests/run-all.R
##########
@@ -61,15 +61,18 @@ if (identical(Sys.getenv("NOT_CRAN"), "true")) {
set.seed(42)
# TODO (SPARK-30663) To be removed once testthat 1.x is removed from all
builds
- if (grepl("^1\\..*", packageVersion("testthat"))) {
+ if (packageVersion("testthat")$major <= 1) {
# testthat 1.x
test_runner <- testthat:::run_tests
reporter <- "summary"
-
} else {
# testthat >= 2.0.0
test_runner <- testthat:::test_package_dir
- reporter <- testthat::default_reporter()
+ dir.create("target/test-reports", showWarnings = FALSE)
+ reporter <- MultiReporter$new(list(
+ SummaryReporter$new(),
+ JunitReporter$new(file = "target/test-reports/test-results.xml")
Review comment:
Yup, otherwise, the console output is not shown. I manually tested.
It was previously `ProgressReporter` (from testthat 2+) by default. It shows
the console output such as:
```
��� | 0 | SparkSQL functions
��� | 1 | SparkSQL functions
��� | 2 | SparkSQL functions
...
```
in Jenkins (ever since we switched the default system encoding if I am not
mistaken).
Now it follows the default format `SummaryReporter` (in testthat 1.x). It
shows the console output as below:
```
functions in client.R: .....
test functions in sparkR.R: ..............................................
include R packages: ..
JVM API: ..
MLlib classification algorithms, except for tree-based algorithms:
...........................................................................
```
There are no differences in the report format when some tests are failed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]