Running ‘testthat.R’ [8s/15s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(awsjavasdk)
  awsjavasdk did not detect its own copy of the AWS SDK. You must execute install_aws_sdk() in order to download the SDK and for the package to work as expected. If you've previously installed to a non-standard location, call set_sdk_file_root({{your alt_install root}}, confirm = TRUE) to point this package to that location and then run awsjavasdk::load_sdk()
  > 
  > test_check("awsjavasdk")
  trying URL 'https://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip'
  Content type 'application/zip' length 394607611 bytes (376.3 MB)
  ==================================================
  downloaded 376.3 MB
  
  ── 1. Error: Alternate install location (@test-awsjavasdk.R#62)  ───────────────
  assert_that: length of assertion is not 1
  1: expect_true(install_aws_sdk(alt_install)) at testthat/test-awsjavasdk.R:62
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: install_aws_sdk(alt_install)
  5: aws_sdk_present(assert = TRUE)
  6: wrap(file.exists(paste0(aws_sdk_root(), "lib/", aws_sdk_version(), ".jar")))
  7: see_if(..., env = env, msg = msg)
  8: check_result(res)
  9: stop("assert_that: length of assertion is not 1", call. = FALSE)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  awsjavasdk
   --- call from context --- 
  fun(libname, pkgname)
   --- call from argument --- 
  if (!aws_sdk_present()) {
      packageStartupMessage(paste0("awsjavasdk did not detect its own copy of the AWS SDK. You must execute install_aws_sdk() in order to download the SDK and for the package to work as expected. If you've previously installed to a non-standard location, call set_sdk_file_root({{your alt_install root}}, confirm = TRUE) to point this package to that location and then run awsjavasdk::load_sdk()"))
  } else {
      packageStartupMessage("The AWS Java SDK is ready to load, run awsjavasdk::load_sdk() to load the AWS .jars")
  }
   --- R stacktrace ---
  where 1: fun(libname, pkgname)
  where 2: doTryCatch(return(expr), name, parentenv, handler)
  where 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 4: tryCatchList(expr, classes, parentenv, handlers)
  where 5: tryCatch(fun(libname, pkgname), error = identity)
  where 6: runHook(".onAttach", ns, dirname(nspath), nsname)
  where 7: attachNamespace(ns, pos = pos, deps)
  where 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, classes, parentenv, handlers)
  where 11: tryCatch({
      attr(package, "LibPath") <- which.lib.loc
      ns <- loadNamespace(package, lib.loc)
      env <- attachNamespace(ns, pos = pos, deps)
  }, error = function(e) {
      P <- if (!is.null(cc <- conditionCall(e))) 
          paste(" in", deparse(cc)[1L])
      else ""
      msg <- gettextf("package or namespace load failed for %s%s:\n %s", 
          sQuote(package), P, conditionMessage(e))
      if (logical.return) 
          message(paste("Error:", msg), domain = NA)
      else stop(msg, call. = FALSE, domain = NA)
  })
  where 12 at testthat/test-awsjavasdk.R#72: library(awsjavasdk)
  where 13: eval(code, test_env)
  where 14: eval(code, test_env)
  where 15: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 16: doTryCatch(return(expr), name, parentenv, handler)
  where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 18: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 21: tryCatchList(expr, classes, parentenv, handlers)
  where 22: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 23: test_code(desc, code, env = parent.frame())
  where 24 at testthat/test-awsjavasdk.R#70: test_that("sdk loads and is usable after a detach in an alternate location", 
      {
          detach("package:awsjavasdk")
          library(awsjavasdk)
          alt_install <- paste0(tempdir(), "/awsjavasdk")
          set_sdk_file_root(alt_install, confirm = TRUE)
          load_sdk()
          expect_gt(nchar(rJava::J("com.amazonaws.util.VersionInfoUtils")$getVersion()), 
              0)
      })
  where 25: eval(code, test_env)
  where 26: eval(code, test_env)
  where 27: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 28: doTryCatch(return(expr), name, parentenv, handler)
  where 29: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 30: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 31: doTryCatch(return(expr), name, parentenv, handler)
  where 32: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 33: tryCatchList(expr, classes, parentenv, handlers)
  where 34: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 35: test_code(NULL, exprs, env)
  where 36: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 37: force(code)
  where 38: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          end_context()
      })
  where 39: FUN(X[[i]], ...)
  where 40: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 41: force(code)
  where 42: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 43: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 44: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 45: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 46: test_check("awsjavasdk")
  
   --- value of length: 2 type: logical ---
  [1] TRUE TRUE
   --- function from context --- 
  function (libname, pkgname) 
  {
      set_sdk_file_root()
      if (!aws_sdk_present()) {
          packageStartupMessage(paste0("awsjavasdk did not detect its own copy of the AWS SDK. You must execute install_aws_sdk() in order to download the SDK and for the package to work as expected. If you've previously installed to a non-standard location, call set_sdk_file_root({{your alt_install root}}, confirm = TRUE) to point this package to that location and then run awsjavasdk::load_sdk()"))
      }
      else {
          packageStartupMessage("The AWS Java SDK is ready to load, run awsjavasdk::load_sdk() to load the AWS .jars")
      }
  }
  <bytecode: 0x55ed1eddbc90>
  <environment: namespace:awsjavasdk>
   --- function search by body ---
  Function .onAttach in namespace awsjavasdk has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1