Running 'tests.R' [236s]
Running the tests in 'tests/tests.R' failed.
Complete output:
  > repos <- "https://cloud.r-project.org"
  > 
  > # avoid timeout error
  > TIMEOUT <- 60
  > if(options()$timeout < TIMEOUT) {
  +   options(timeout = TIMEOUT)
  + }
  > 
  > try_result <- try({
  +   cat("get package list by date\n")
  +   pkg_by_date <- dateback:::.get_pkg_by_date(repos)
  +   print(head(pkg_by_date))
  +   cat("\n")
  + 
  +   cat("get latest package list\n")
  +   pkg_latest <- dateback:::.get_pkg_latest(repos)
  +   print(head(pkg_latest))
  +   cat("\n")
  + 
  +   cat("get archived version list\n")
  +   .get_archived_pkgs <- function(repos) {
  +     html <- dateback:::.get_html(dateback:::.get_archive_url(repos))
  +     rows <- grep("<a href=\".*?/\">.*?/",
  +                  strsplit(
  +                    paste(html, collapse = " "), # some rows may contain \n
  +                    "</a>")[[1]],
  +                  value = TRUE)
  +     sub(".*<a href=\".*?/\">(.*?)/.*", "\\1", rows)
  +   }
  + 
  +   archived_pkgs <- .get_archived_pkgs(repos)
  +   df_archive <- dateback:::.get_df_archive(repos, sample(archived_pkgs, 1))
  +   print(head(df_archive))
  + }, silent = TRUE)
  get package list by date
       Package       Date
  1 CoDaImpact 2024-03-23
  2     modsem 2024-03-23
  3   stylest2 2024-03-23
  4    vartest 2024-03-23
  5        abn 2024-03-22
  6      ANOPA 2024-03-22
  
  get latest package list
        Package Version       Date
  1          A3   1.0.0 2015-08-16
  2    AATtools   0.0.2 2022-08-12
  3      ABACUS   1.0.0 2019-09-20
  4     ABC.RAP   0.9.0 2016-10-20
  5 ABCanalysis   1.2.1 2017-03-13
  6    ABCoptim  0.15.0 2017-11-06
  
  get archived version list
  Warning message:
  In readLines(con) :
    URL 'https://cloud.r-project.org/src/contrib/Archive/': Timeout of 60 seconds was reached
  > 
  > if(inherits(try_result, "try-error")) {
  +   is_timeout <- grepl("readLines", try_result) &&
  +     any(sapply(names(warnings()), function(x) grepl("Timeout", x)))
  + 
  +   if(any(is_timeout)) {
  +     cat("Timeout occcured\n")
  +   } else {
  +     stop(try_result)
  +   }
  + }
  Timeout occcured
  > 
  > proc.time()
     user  system elapsed 
     3.79    0.29   65.31