From eb860e922856b43b4f75b5dda72ebd4b2b179a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:56:23 +0000 Subject: [PATCH 1/2] Stop R process if AppDriver fails in `test-examples` (#1303) # Pull Request Fixes #1302 --- tests/testthat/test-examples.R | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-examples.R b/tests/testthat/test-examples.R index ac0ed08c2e..8adc9f92fb 100644 --- a/tests/testthat/test-examples.R +++ b/tests/testthat/test-examples.R @@ -49,11 +49,17 @@ with_mocked_app_bindings <- function(code) { args <- list(...) args[["launch.browser"]] <- FALSE # needed for RStudio - app_driver <- shinytest2::AppDriver$new( - x, - shiny_args = args, - check_names = FALSE, # explicit check below - options = options() # https://github.com/rstudio/shinytest2/issues/377 + app_driver <- tryCatch( + shinytest2::AppDriver$new( + x, + shiny_args = args, + check_names = FALSE, # explicit check below + options = options() # https://github.com/rstudio/shinytest2/issues/377 + ), + error = function(e) { + e$app$stop() # Ensure the R instance is stopped + stop(e) + } ) on.exit(app_driver$stop(), add = TRUE) app_driver$wait_for_idle(timeout = 20000) @@ -118,6 +124,7 @@ for (i in rd_files()) { paste0("example-", basename(i)), { testthat::skip_on_cran() + skip_if_too_deep(5) if (basename(i) %in% strict_exceptions) { op <- options() withr::local_options(opts_partial_match_old) From c2c21c78216bcb8d47db10ecbe164752b6ad983e Mon Sep 17 00:00:00 2001 From: averissimo Date: Tue, 17 Dec 2024 11:57:15 +0000 Subject: [PATCH 2/2] [skip actions] Bump version to 0.9.1.9041 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5061956a73..46d0e4092a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: teal.modules.clinical Title: 'teal' Modules for Standard Clinical Outputs -Version: 0.9.1.9040 -Date: 2024-12-11 +Version: 0.9.1.9041 +Date: 2024-12-17 Authors@R: c( person("Joe", "Zhu", , "joe.zhu@roche.com", role = c("aut", "cre")), person("Jana", "Stoilova", , "jana.stoilova@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 7c0402ea3c..7cbbc3a37e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# teal.modules.clinical 0.9.1.9040 +# teal.modules.clinical 0.9.1.9041 ### Enhancements * Added `teal.logger` functionality for logging changes in shiny inputs in all modules.