Skip to content

Commit

Permalink
Change message load_timeout (#394)
Browse files Browse the repository at this point in the history
Co-authored-by: Garrick Aden-Buie <[email protected]>
  • Loading branch information
LouisLeNezet and gadenbuie authored Oct 7, 2024
1 parent bf08af4 commit ffa9e3c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Add support for `$click()`ing `{bslib}`'s `input_task_button()` (#829).

* Improved the error message when an app takes too long to start up (@LouisLeNezet, #394).

# shinytest2 0.3.2

## Bug / Improvements
Expand Down
11 changes: 9 additions & 2 deletions R/app-driver-start.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ app_start_shiny <- function(
Sys.sleep(0.2)

if (i == max_i) {
app_abort(self, private, paste0(
"Cannot find shiny port number. Error lines found:\n",
app_abort(self, private, sprintf(
paste(
"The Shiny app failed to start up within %s second%s.",
"To increase the loading timeout, consult the documentation in `?AppDriver`",
"for the `load_timeout` argument of `AppDriver$new()`.",
"The app printed the following lines to stderr during start up:\n%s"
),
load_timeout / 1000,
if (load_timeout == 1000) "" else "s",
paste(err_lines, collapse = "\n")
))
}
Expand Down

0 comments on commit ffa9e3c

Please sign in to comment.