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)
})
tudo-r/BatchJobs documentation built on Dec. 1, 2017, 4:02 a.m.