HyukjinKwon commented on a change in pull request #29456:
URL: https://github.com/apache/spark/pull/29456#discussion_r471926129
##########
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:
It _looks_ supported in testthat 1.x but testthat 1.x support here is
supposed to be removed soon at SPARK-30663. I didn't bother test as Jenkins and
GitHub Actions use testthat 2+ anyway.
----------------------------------------------------------------
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]