Running ‘testthat.R’ [2s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(queueing)
  > 
  > test_check("queueing")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  queueing
   --- call from context --- 
  CheckInput.i_OJN(x)
   --- call from argument --- 
  if (is_prob_a_matrix) {
      if (nrow(x$prob) != ncol(x$prob)) 
          stop(row_distinct_col)
      if (nrow(x$prob) != num_nodes) 
          stop(row_distinct_nodes)
  } else {
      if (length(x$prob) != num_nodes) 
          stop(visit_ratios_wrong)
  }
   --- R stacktrace ---
  where 1: CheckInput.i_OJN(x)
  where 2: CheckInput(x)
  where 3: QueueingModel.i_OJN(NewInput.OJN(prob, n1, n2, n3, n4))
  where 4 at testthat/test-networks-basic-performance-metrics.R#8: QueueingModel(NewInput.OJN(prob, n1, n2, n3, n4))
  where 5: eval(code, test_env)
  where 6: eval(code, test_env)
  where 7: 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 8: doTryCatch(return(expr), name, parentenv, handler)
  where 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 11: doTryCatch(return(expr), name, parentenv, handler)
  where 12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 13: tryCatchList(expr, classes, parentenv, handlers)
  where 14: 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 15: test_code(NULL, exprs, env)
  where 16: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 17: force(code)
  where 18: doWithOneRestart(return(expr), restart)
  where 19: withOneRestart(expr, restarts[[1L]])
  where 20: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 21: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 22: FUN(X[[i]], ...)
  where 23: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 24: force(code)
  where 25: doWithOneRestart(return(expr), restart)
  where 26: withOneRestart(expr, restarts[[1L]])
  where 27: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 28: 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 29: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 30: 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 31: 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 32: test_check("queueing")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (x, ...) 
  {
      x_class_OJN <- "x has to be of class i_OJN (Open Jackson Network)"
      x_anomalous <- "x has some anomalous value. Check the value(s)."
      row_distinct_col <- "x$prob has the number of rows distinct of the number of columns."
      row_distinct_nodes <- "x$prob has distinct number of rows that the number of nodes in x$nodes."
      visit_ratios_wrong <- "x$prob contains a different number of visit ratios than x$nodes."
      prob_zero <- "If neither a routing x$prob is given nor a visit ratio vector, x$prob should be 0"
      all_lambda_equals <- "if visit ratios are given, all nodes must have the same lambda (the sum of all external arrivals)"
      is_prob_a_matrix <- (class(x$prob) == "matrix")
      if (is.anomalous(x$prob) || is.anomalous(x$nodes)) 
          stop(x_anomalous)
      if (class(x) != "i_OJN") 
          stop(x_class_OJN)
      num_nodes <- length(x$nodes)
      if (is_prob_a_matrix) {
          if (nrow(x$prob) != ncol(x$prob)) 
              stop(row_distinct_col)
          if (nrow(x$prob) != num_nodes) 
              stop(row_distinct_nodes)
      }
      else {
          if (length(x$prob) != num_nodes) 
              stop(visit_ratios_wrong)
      }
      i <- 1
      while (i <= num_nodes) {
          n = x$nodes[[i]]
          if (class(n) != "i_MM1" && class(n) != "i_MMC" && class(n) != 
              "i_MMInf") 
              stop(paste(paste("Node ", i), "is not of class i_MM1, i_MMC or i_MMInf!!"))
          if (!is_prob_a_matrix && (x$nodes[[i]]$lambda != x$nodes[[1]]$lambda)) 
              stop(all_lambda_equals)
          CheckInput(n)
          i <- i + 1
      }
  }
  <bytecode: 0x55939ed92030>
  <environment: namespace:queueing>
   --- function search by body ---
  Function CheckInput.i_OJN in namespace queueing has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1