Running ‘testthat.R’ [19s/95s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv(R_TESTS = "")
  > library(testthat)
  > library(tableschema.r)
  > 
  > test_check("tableschema.r")
  
   *** caught segfault ***
  address 0x563800000001, cause 'memory not mapped'
  
  Traceback:
   1: value %in% private$missingValues
   2: private$castValue(...)
   3: field$cast_value(value = items[[i]], constraints = !skipConstraints)
   4: doTryCatch(return(expr), name, parentenv, handler)
   5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   6: tryCatchList(expr, classes, parentenv, handlers)
   7: tryCatch({    field <- self$getField(headers[[i]], i)    value <- field$cast_value(value = items[[i]], constraints = !skipConstraints)    if (!skipConstraints) {        if (!is.null(self$uniqueness) && !is.null(self$uniqueHeaders) &&             self$uniqueness == TRUE && self$uniqueHeaders ==             TRUE) {            helpers.checkUnique(field$name, value, self$uniqueHeaders,                 self$uniqueness)        }    }    result <- append(result, list(value))}, error = function(e) {    error <- stringr::str_interp("Wrong type for header: ${headers[[i]]} and value: ${items[[i]]}")    if (failFast == TRUE) {        stop(error)    }    else {        attempt <- list(error = error)    }})
   8: self$schema$castRow(row)
   9: obj$state$fun()
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch({    if (obj$args) {        val <- obj$state$fun(obj$state$i + 1L)    }    else {        val <- obj$state$fun()    }    if (obj$checkFunc(val)) {        if (obj$args)             obj$state$i <- obj$state$i + 1L        return(val)    }    if (obj$args)         obj$state$i <- obj$state$i + 1L}, error = function(e) {    if (any(nzchar(e$message))) {        if (identical(e$message, "StopIteration")) {            if (obj$recycle) {                if (obj$args)                   obj$state$i <- 0L            }            else {                stop("StopIteration", call. = FALSE)            }        }        else {            stop(e$message, call. = FALSE)        }    }    else {        stop("Abort", call. = e)    }})
  14: nextElem.funiter(iterator)
  15: iterators::nextElem(iterator)
  16: doTryCatch(return(expr), name, parentenv, handler)
  17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  18: tryCatchList(expr, classes, parentenv, handlers)
  19: tryCatch({    it <- iterators::nextElem(iterator)    rows <- append(rows, list(it))    0}, error = function(cond) {    if (identical(cond$message, "StopIteration")) {        return(1)    }    if (identical(cond$message, "HeadersRow")) {        return(-1)    }    stop(cond)})
  20: withCallingHandlers(tryCatch({    it <- iterators::nextElem(iterator)    rows <- append(rows, list(it))    0}, error = function(cond) {    if (identical(cond$message, "StopIteration")) {        return(1)    }    if (identical(cond$message, "HeadersRow")) {        return(-1)    }    stop(cond)}), warning = function(cond) {    stop(cond)    invokeRestart("muffleWarning")})
  21: table$read()
  22: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  23: withCallingHandlers({    code    NULL}, error = function(cnd) {    if (can_entrace(cnd)) {        cnd <- cnd_entrace(cnd)    }    return_from(env, cnd)})
  24: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)),     ...)
  25: quasi_capture(enquo(object), label, capture_error, entrace = TRUE)
  26: expect_error(table$read(), ".*duplicates.*")
  27: eval(code, test_env)
  28: eval(code, test_env)
  29: 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)
  30: doTryCatch(return(expr), name, parentenv, handler)
  31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  32: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  33: doTryCatch(return(expr), name, parentenv, handler)
  34: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  35: tryCatchList(expr, classes, parentenv, handlers)
  36: 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) {    })
  37: test_code(desc, code, env = parent.frame(), default_reporter = local_interactive_reporter())
  38: test_that("unique constraints violation for primary key", {    source <- list(list(1, "10.1", "1", "string1", "2012-06-15"),         list(1, "10.2", "2", "string2", "2012-07-15"))    def2 <- Table.load(source, schema = SCHEMA, headers = FALSE)    table <- future::value(def2)    expect_error(table$read(), ".*duplicates.*")})
  39: eval(code, test_env)
  40: eval(code, test_env)
  41: 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)
  42: doTryCatch(return(expr), name, parentenv, handler)
  43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  44: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  45: doTryCatch(return(expr), name, parentenv, handler)
  46: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  47: tryCatchList(expr, classes, parentenv, handlers)
  48: 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) {    })
  49: test_code(test = NULL, code = exprs, env = env, default_reporter = StopReporter$new())
  50: source_file(path, env(env), wrap = wrap)
  51: FUN(X[[i]], ...)
  52: lapply(test_paths, test_one_file, env = env, wrap = wrap)
  53: doTryCatch(return(expr), name, parentenv, handler)
  54: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  55: tryCatchList(expr, classes, parentenv, handlers)
  56: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
  57: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
  58: test_files_serial(test_dir = test_dir, test_package = test_package,     test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,     env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package)
  59: test_files(test_dir = path, test_paths = test_paths, test_package = package,     reporter = reporter, load_helpers = load_helpers, env = env,     stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap, load_package = load_package, parallel = parallel)
  60: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
  61: test_check("tableschema.r")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault