Running ‘BatchtoolsFuture,gc.R’ [4s/7s]
  Running ‘BatchtoolsFuture.R’ [4s/6s]
  Running ‘BatchtoolsFutureError.R’ [5s/18s]
Running the tests in ‘tests/BatchtoolsFutureError.R’ failed.
Complete output:
  > source("incl/start.R")
  Loading required package: future
  > 
  > message("*** BatchtoolsFutureError() ...")
  *** BatchtoolsFutureError() ...
  > 
  > plan(batchtools_local)
  > 
  > for (cleanup in c(FALSE, TRUE)) {
  +   mprintf("*** batchtools future error w/ future.delete = %s ...", cleanup)
  + 
  +   options(future.delete = cleanup)
  + 
  +   f <- future({
  +     x <- 1
  +     print(x)
  +     stop("Woops!")
  +   })
  +   print(f)
  + 
  +   resolve(f)
  + 
  +   ## Assert future is listed as resolved
  +   stopifnot(resolved(f))
  + 
  +   reg <- f$config$reg
  + 
  +   ## Force garbage collection of future which will possibly
  +   ## result in the removal of batchtools registry files
  +   reg.finalizer(f, function(f) {
  +     message("Garbage collection future ...")
  +     print(f)
  +     message("Garbage collection future ... DONE")
  +   }, onexit = TRUE)
  +   rm(list = "f")
  +   gc()
  +   message(" - Future removed and garbage collected.")
  +   mprintf(" - batchtools Registry path (%s) exists: %s",
  +           sQuote(reg$file.dir), file_test("-d", reg$file.dir))
  + 
  +   ## Assert removal of files only happens if there was not
  +   ## a failure and option future.delete is not TRUE.
  +   if (!cleanup) {
  +     stopifnot(file_test("-d", reg$file.dir))
  +     log <- batchtools::getLog(reg = reg, id = 1L)
  +     print(log)
  + 
  +     ## Now manually delete batchtools Registry
  +     batchtools::removeRegistry(reg = reg)
  +   }
  + 
  +   stopifnot(!file_test("-d", reg$file.dir))
  +   fail <- try(checkIds(reg, ids = 1L), silent = TRUE)
  +   stopifnot(inherits(fail, "try-error"))
  + 
  +   mprintf("*** batchtools future error w/ future.delete = %s ... DONE", cleanup)
  + } ## for (cleanup ...)
  *** batchtools future error w/ future.delete = FALSE ...getGlobalsAndPackages() ...
  Searching for globals ...
  - globals found: [4] '{', '<-', 'print', 'stop'
  Searching for globals ... DONE
  Resolving globals: FALSE
  
  
  getGlobalsAndPackages() ... DONE
  No configuration file found
  Created registry in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001' using cluster functions 'Interactive'
  Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 0
    Seed     : 16766
    Writeable: TRUE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 0): <none>
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "error")
          {
              NULL
              future::plan("default", .cleanup = FALSE, .init = FALSE)
          }
      }
      tryCatch({
          local({
              x <- 1
              print(x)
              stop("Woops!")
          })
      }, finally = {
          {
              {
                  NULL
                  future::plan(list(function (expr, envir = parent.frame(), 
                    substitute = TRUE, globals = TRUE, label = NULL, 
                    workers = 1L, ...) 
                  {
                    if (substitute) 
                      expr <- substitute(expr)
                    cf <- makeClusterFunctionsInteractive(external = TRUE)
                    future <- BatchtoolsFuture(expr = expr, envir = envir, 
                      substitute = FALSE, globals = globals, label = label, 
                      workers = workers, cluster.functions = cf, 
                      ...)
                    if (!future$lazy) 
                      future <- run(future)
                    future
                  }), .cleanup = FALSE, .init = FALSE)
              }
              options(...future.oldOptions)
          }
      })
  }
  batchtools::batchMap()
  Adding 1 jobs ...
  Created BatchtoolsFuture future #1
  Submitting 1 jobs in 1 chunks using cluster functions 'Interactive' ...
  Launched future #1
  BatchtoolsFuture:
  Label: '<none>'
  Expression:
  {
      x <- 1
      print(x)
      stop("Woops!")
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: <environment: R_GlobalEnv>
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none>
  Resolved: TRUE
  Value: <not collected>
  Early signalling: FALSE
  Owner process: 3e6d90bf-e26f-7c69-98de-dedd0ee584e1
  Class: 'BatchtoolsFuture', 'Future', 'environment'
  batchtools cluster functions: 'Interactive'
  batchtools status: 'defined', 'error', 'started', 'submitted'
  Error: 'Error in eval(quote({ : Woops!'
  batchtools Registry:
    Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 16766
    Writeable: TRUE
  A BatchtoolsFuture was resolved (value was not collected)
  Garbage collection future ...
  BatchtoolsFuture:
  Label: '<none>'
  Expression:
  {
      x <- 1
      print(x)
      stop("Woops!")
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: <environment: R_GlobalEnv>
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none>
  Resolved: TRUE
  Value: <not collected>
  Early signalling: FALSE
  Owner process: 3e6d90bf-e26f-7c69-98de-dedd0ee584e1
  Class: 'BatchtoolsFuture', 'Future', 'environment'
  batchtools cluster functions: 'Interactive'
  batchtools status: 'defined', 'error', 'started', 'submitted'
  Error: 'Error in eval(quote({ : Woops!'
  batchtools Registry:
    Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 16766
    Writeable: TRUE
  Garbage collection future ... DONE
  delete(): Option 'future.delete = 'FALSE'
  delete(): Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001'
  Warning in delete.BatchtoolsFuture(future, onRunning = "skip", onMissing = "ignore",  :
    Will not remove batchtools registry, because the status of the batchtools was 'defined', 'error', 'started', 'submitted' and option 'future.delete' is FALSE or running in an interactive session: '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001'
   - Future removed and garbage collected.
   - batchtools Registry path ('/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001') exists: TRUE [1] "### [bt 2017-12-08 18:23:41]: This is batchtools v0.9.7"                                                                                   
   [2] "### [bt 2017-12-08 18:23:41]: Starting calculation of 1 jobs"                                                                              
   [3] "### [bt 2017-12-08 18:23:41]: Setting working directory to '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests'"
   [4] "### [bt 2017-12-08 18:23:41]: Memory measurement disabled"                                                                                 
   [5] "### [bt 2017-12-08 18:23:41]: Starting job [batchtools job.id=1]"                                                                          
   [6] "[1] 1"                                                                                                                                     
   [7] "Error in eval(quote({ : Woops!"                                                                                                            
   [8] ""                                                                                                                                          
   [9] "### [bt 2017-12-08 18:23:41]: Job terminated with an exception [batchtools job.id=1]"                                                      
  [10] "### [bt 2017-12-08 18:23:41]: Calculation finished!"                                                                                       
  This deletes all files in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001'. Proceeding in 5 seconds ...
  Unsetting registry as default
  Recursively removing files in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_420332001' ...
  *** batchtools future error w/ future.delete = FALSE ... DONE*** batchtools future error w/ future.delete = TRUE ...getGlobalsAndPackages() ...
  Searching for globals ...
  - globals found: [4] '{', '<-', 'print', 'stop'
  Searching for globals ... DONE
  Resolving globals: FALSE
  
  
  getGlobalsAndPackages() ... DONE
  No configuration file found
  Created registry in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342' using cluster functions 'Interactive'
  Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 0
    Seed     : 3135
    Writeable: TRUE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 0): <none>
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "error")
          {
              NULL
              future::plan("default", .cleanup = FALSE, .init = FALSE)
          }
      }
      tryCatch({
          local({
              x <- 1
              print(x)
              stop("Woops!")
          })
      }, finally = {
          {
              {
                  NULL
                  future::plan(list(function (expr, envir = parent.frame(), 
                    substitute = TRUE, globals = TRUE, label = NULL, 
                    workers = 1L, ...) 
                  {
                    if (substitute) 
                      expr <- substitute(expr)
                    cf <- makeClusterFunctionsInteractive(external = TRUE)
                    future <- BatchtoolsFuture(expr = expr, envir = envir, 
                      substitute = FALSE, globals = globals, label = label, 
                      workers = workers, cluster.functions = cf, 
                      ...)
                    if (!future$lazy) 
                      future <- run(future)
                    future
                  }), .cleanup = FALSE, .init = FALSE)
              }
              options(...future.oldOptions)
          }
      })
  }
  batchtools::batchMap()
  Adding 1 jobs ...
  Created BatchtoolsFuture future #1
  Submitting 1 jobs in 1 chunks using cluster functions 'Interactive' ...
  Launched future #1
  BatchtoolsFuture:
  Label: '<none>'
  Expression:
  {
      x <- 1
      print(x)
      stop("Woops!")
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: <environment: R_GlobalEnv>
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none>
  Resolved: TRUE
  Value: <not collected>
  Early signalling: FALSE
  Owner process: 3e6d90bf-e26f-7c69-98de-dedd0ee584e1
  Class: 'BatchtoolsFuture', 'Future', 'environment'
  batchtools cluster functions: 'Interactive'
  batchtools status: 'defined', 'error', 'started', 'submitted'
  Error: 'Error in eval(quote({ : Woops!'
  batchtools Registry:
    Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 3135
    Writeable: TRUE
  A BatchtoolsFuture was resolved (value was not collected)
  Garbage collection future ...
  BatchtoolsFuture:
  Label: '<none>'
  Expression:
  {
      x <- 1
      print(x)
      stop("Woops!")
  }
  Lazy evaluation: FALSE
  Asynchronous evaluation: TRUE
  Local evaluation: TRUE
  Environment: <environment: R_GlobalEnv>
  Globals: <none>
  Packages: <none>
  L'Ecuyer-CMRG RNG seed: <none>
  Resolved: TRUE
  Value: <not collected>
  Early signalling: FALSE
  Owner process: 3e6d90bf-e26f-7c69-98de-dedd0ee584e1
  Class: 'BatchtoolsFuture', 'Future', 'environment'
  batchtools cluster functions: 'Interactive'
  batchtools status: 'defined', 'error', 'started', 'submitted'
  Error: 'Error in eval(quote({ : Woops!'
  batchtools Registry:
    Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 1
    Seed     : 3135
    Writeable: TRUE
  Garbage collection future ... DONE
  delete(): Option 'future.delete = 'TRUE'
  Removing 1 jobs ...
  Removing user function ...
  Removing 0 obsolete result files ...
  Removing 1 obsolete log files ...
  Removing 0 obsolete job collection files ...
  Removing 0 job description files ...
  Removing 0 external directories of unsubmitted jobs ...
  Removing 0 resource specifications ...
  Removing 0 tags ...
  Unsetting registry as default
  Recursively removing files in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342' ...
  delete(): batchtools registry deleted: '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342'
   - Future removed and garbage collected.
   - batchtools Registry path ('/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_995992342') exists: FALSE*** batchtools future error w/ future.delete = TRUE ... DONE> 
  > 
  > message("*** BatchtoolsFuture - expired ...")
  *** BatchtoolsFuture - expired ...
  > plan(batchtools_local)
  > msg <- "Abruptly terminating the future!"
  > f <- future({
  +   message(msg)
  +   quit(save = "no")
  + })
  getGlobalsAndPackages() ...
  Searching for globals ...
  - globals found: [4] '{', 'message', 'msg', 'quit'
  Searching for globals ... DONE
  Resolving globals: FALSE
  The total size of the 1 globals is 152 bytes (152 bytes)
  - globals: [1] 'msg'
  
  getGlobalsAndPackages() ... DONE
  No configuration file found
  Created registry in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_613585395' using cluster functions 'Interactive'
  Job Registry
    Backend  : Interactive
    File dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_613585395
    Work dir : /home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests
    Jobs     : 0
    Seed     : 25330
    Writeable: TRUE
  Packages needed by future strategies (n = 0): <none>
  Packages needed by the future expression (n = 0): <none>
  {
      {
          ...future.oldOptions <- options(future.startup.loadScript = FALSE, 
              future.globals.onMissing = "error")
          {
              NULL
              future::plan("default", .cleanup = FALSE, .init = FALSE)
          }
      }
      tryCatch({
          local({
              message(msg)
              quit(save = "no")
          })
      }, finally = {
          {
              {
                  NULL
                  future::plan(list(function (expr, envir = parent.frame(), 
                    substitute = TRUE, globals = TRUE, label = NULL, 
                    workers = 1L, ...) 
                  {
                    if (substitute) 
                      expr <- substitute(expr)
                    cf <- makeClusterFunctionsInteractive(external = TRUE)
                    future <- BatchtoolsFuture(expr = expr, envir = envir, 
                      substitute = FALSE, globals = globals, label = label, 
                      workers = workers, cluster.functions = cf, 
                      ...)
                    if (!future$lazy) 
                      future <- run(future)
                    future
                  }), .cleanup = FALSE, .init = FALSE)
              }
              options(...future.oldOptions)
          }
      })
  }
  Exporting new objects: 'msg' ...
  batchtools::batchMap()
  Adding 1 jobs ...
  Created BatchtoolsFuture future #1
  Submitting 1 jobs in 1 chunks using cluster functions 'Interactive' ...
  Launched future #1
  > res <- tryCatch({
  +   v <- value(f)
  + }, error = identity)
  batchtools::waitForJobs() ...
  - batchtools::waitForJobs(): FALSE
  - status(): 'defined', 'expired', 'submitted'
  batchtools::waitForJobs() ... done
  Results:
  Future state: 'failed'
  Future value: 'Error: object '.datatable.aware' not found
  '
  > stopifnot(inherits(res, "error"),
  +           inherits(res, "FutureError"))
  > err_msg <- unlist(strsplit(conditionMessage(res), split = "\n", fixed = TRUE))
  > stopifnot(any(grepl(msg, err_msg, fixed = TRUE)))
  Error: any(grepl(msg, err_msg, fixed = TRUE)) is not TRUE
  Execution halted
  delete(): Option 'future.delete = 'TRUE'
  Removing 1 jobs ...
  Removing user function ...
  Removing 0 obsolete result files ...
  Removing 1 obsolete log files ...
  Removing 0 obsolete job collection files ...
  Removing 0 job description files ...
  Removing 0 external directories of unsubmitted jobs ...
  Removing 0 resource specifications ...
  Removing 0 tags ...
  Unsetting registry as default
  Recursively removing files in '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_613585395' ...
  delete(): batchtools registry deleted: '/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/future.batchtools.Rcheck/tests/.future/20171208_182339-VN0LLl/batchtools_613585395'