tests/testthat/test_findStatus.R

context("findStatus")

test_that("findStatus", {
  reg = makeTestRegistry()
  f = function(i) {
    if (i == 2)
      stop(123)
  }
  batchMap(reg, f, 1:3)
  ids = getJobIds(reg)
  submitJobs(reg)
  waitForJobs(reg)
  j = findDone(reg)
  expect_equal(j, ids[-2])
  j = findErrors(reg)
  expect_equal(j, ids[2])
  j = findNotDone(reg)
  expect_equal(j, ids[2])
  j = findStarted(reg)
  expect_equal(j, 1:3)
})

Try the BatchJobs package in your browser

Any scripts or data that you put into this service are public.

BatchJobs documentation built on March 21, 2022, 5:05 p.m.