Skip to content

Commit 5f7c7c7

Browse files
committed
disable verbose download in live tests, but be verbose overall
1 parent 3683a5b commit 5f7c7c7

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/java-live-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3434
R_KEEP_PKG_SOURCE: yes
3535
RUN_JAVA_DOWNLOAD_TESTS: "TRUE"
36+
RUN_JAVA_DOWNLOAD_TESTS_QUIET: "FALSE"
37+
RUN_JAVA_DOWNLOAD_TESTS_QUIET_DOWNLOAD: "TRUE"
3638

3739
steps:
3840
- uses: actions/checkout@v4

tests/testthat/test-java_full-cycle-live.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ test_that("full download, install, check, and clear cycle works for all versions
44
# Sys.setenv("RUN_JAVA_DOWNLOAD_TESTS" = "TRUE")
55
# Sys.setenv("RUN_JAVA_DOWNLOAD_TESTS_QUIET" = "FALSE")
66
# Sys.setenv("RUN_JAVA_DOWNLOAD_TESTS_QUIET" = "TRUE")
7+
# Sys.setenv("RUN_JAVA_DOWNLOAD_TESTS_QUIET_DOWNLOAD" = "FALSE")
8+
# Sys.setenv("RUN_JAVA_DOWNLOAD_TESTS_QUIET_DOWNLOAD" = "TRUE")
79
skip_if_not(
810
Sys.getenv("RUN_JAVA_DOWNLOAD_TESTS") == "TRUE",
911
"Skipping real download test. Set RUN_JAVA_DOWNLOAD_TESTS='TRUE' to run."
@@ -13,6 +15,11 @@ test_that("full download, install, check, and clear cycle works for all versions
1315
} else {
1416
rj_quiet <- FALSE
1517
}
18+
if (Sys.getenv("RUN_JAVA_DOWNLOAD_TESTS_QUIET_DOWNLOAD") == "TRUE") {
19+
rj_dl_quiet <- TRUE
20+
} else {
21+
rj_dl_quiet <- FALSE
22+
}
1623

1724
# --- 1. Setup a Self-Cleaning Temporary Environment ---
1825
main_temp_dir <- tempfile(pattern = "rJavaEnv-full-test-")
@@ -54,7 +61,7 @@ test_that("full download, install, check, and clear cycle works for all versions
5461
cli::cli_inform("-> Step 1: Downloading Java {java_version}...")
5562
downloaded_file <- java_download(
5663
version = java_version,
57-
quiet = rj_quiet,
64+
quiet = rj_dl_quiet,
5865
force = FALSE,
5966
)
6067
testthat::expect_true(file.exists(downloaded_file), info = context_info)

0 commit comments

Comments
 (0)