File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -47,14 +47,21 @@ with_mocked_app_bindings <- function(code) {
4747 args <- list (... )
4848 args [[" launch.browser" ]] <- FALSE # needed for RStudio
4949
50- app_driver <- shinytest2 :: AppDriver $ new(
51- x ,
52- shiny_args = args ,
53- timeout = 20 * 1000 ,
54- load_timeout = 30 * 1000 ,
55- check_names = FALSE , # explicit check below
56- options = options() # https://github.com/rstudio/shinytest2/issues/377
50+ app_driver <- tryCatch(
51+ shinytest2 :: AppDriver $ new(
52+ x ,
53+ shiny_args = args ,
54+ timeout = 20 * 1000 ,
55+ load_timeout = 30 * 1000 ,
56+ check_names = FALSE , # explicit check below
57+ options = options() # https://github.com/rstudio/shinytest2/issues/377
58+ ),
59+ error = function (e ) {
60+ e $ app $ stop() # Ensure the R instance is stopped
61+ stop(e )
62+ }
5763 )
64+
5865 on.exit(app_driver $ stop(), add = TRUE )
5966 app_driver $ wait_for_idle()
6067
You can’t perform that action at this time.
0 commit comments