Running ‘testthat.R’ [2s/164s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(klassR)
  > 
  > test_check("klassR")
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  Note: Correspondence tables provided using an ID do not har a date attached. Date is being ignored.
  Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10001 ms: Timeout was reached
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_ApplyKlass.R:4:3'): ApplyKlass returns correct names for numeric codes ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(klassdata$kommune, klass = 131, date = "2015-01-01") at test_ApplyKlass.R:4:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:12:3'): ApplyKlass returns correct names for character codes ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(c("INNL", "UTL", "B_FIN"), klass = 39, date = "2019-01-01") at test_ApplyKlass.R:12:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:20:3'): ApplyKlass returns correct language ───────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(...) at test_ApplyKlass.R:20:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:35:10'): ApplyKlass returns correctly for character codes ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(sektor, 39, date = "2020-01-01") at test_ApplyKlass.R:35:9
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:41:3'): Check levelCheck for numerical codes ──────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(7, date = "2020-01-01") at test_ApplyKlass.R:41:2
   2.   └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:51:3'): Check levelCheck for character codes ──────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(39, date = "2020-01-01") at test_ApplyKlass.R:51:2
   2.   └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:61:3'): ApplyKlass can return a variant classification ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(dat, klass = 6, variant = 1616, date = "2021-01-02") at test_ApplyKlass.R:61:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::get_variant_name(variant)
   4.       └─klassR:::stop_quietly()
  ── Error ('test_ApplyKlass.R:77:3'): ApplyKlass works for variant classification with Norwegian characters in the variant name ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::ApplyKlass(...) at test_ApplyKlass.R:77:2
   2.   └─klassR::GetKlass(...)
   3.     └─klassR:::get_variant_name(variant)
   4.       └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:4:3'): GetKlass returns a classification ────────────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 131, date = "2015-01-01") at test_GetKlass.R:4:2
   2.   └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:10:3'): GetKlass returns a classification with Norwegian letters ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 131, date = "2015-01-01") at test_GetKlass.R:10:2
   2.   └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:16:3'): GetKlass returns a correspondence table ─────
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 104, correspond = 131, date = "2015-01-01") at test_GetKlass.R:16:2
   2.   └─klassR:::GetUrl2(url, check = FALSE)
   3.     └─httr::GET(url = url)
   4.       └─httr:::request_perform(req, hu$handle$handle)
   5.         ├─httr:::request_fetch(req$output, req$url, handle)
   6.         └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   7.           └─curl::curl_fetch_memory(url, handle = handle)
  ── Error ('test_GetKlass.R:23:3'): GetKlass returns a correspondence table in both directions ──
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached: [data.ssb.no] Failed to connect to data.ssb.no port 443 after 10000 ms: Timeout was reached
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 104, correspond = 131, date = "2020-02-01") at test_GetKlass.R:23:2
   2.   └─klassR:::GetUrl2(url, check = FALSE)
   3.     └─httr::GET(url = url)
   4.       └─httr:::request_perform(req, hu$handle$handle)
   5.         ├─httr:::request_fetch(req$output, req$url, handle)
   6.         └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   7.           └─curl::curl_fetch_memory(url, handle = handle)
  ── Error ('test_GetKlass.R:33:3'): GetKlass returns a valid variant ────────────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(klass = 6, variant = 1616, date = "2021-01-02") at test_GetKlass.R:33:2
   2.   └─klassR:::get_variant_name(variant)
   3.     └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:40:3'): GetKlass returns notes when requested ───────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(277, notes = TRUE, date = "2023-01-12") at test_GetKlass.R:40:2
   2.   └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:48:3'): GetKlass returns a future classification ────
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. ├─testthat::expect_message(classdata <- GetKlass(104, date = "2024-01-01")) at test_GetKlass.R:48:2
   2. │ └─testthat:::expect_condition_matching(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─klassR::GetKlass(104, date = "2024-01-01")
   8.   └─klassR:::stop_quietly()
  ── Error ('test_GetKlass.R:54:3'): GetKlass returns a correspondence table using ID ──
  Error in `stop_quietly()`: 
  Backtrace:
      ▆
   1. └─klassR::GetKlass(correspondID = 1111, date = "2023-01-12") at test_GetKlass.R:54:2
   2.   └─klassR:::stop_quietly()
  
  [ FAIL 16 | WARN 0 | SKIP 0 | PASS 0 ]
  Error: Test failures
  Execution halted