Running ‘testthat.R’ [12s/313s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(grattan)
  > 
  > library(data.table)
  > if (requireNamespace("taxstats", quietly = TRUE)){
  +   library(taxstats)
  + }
  > library(dplyr)
  ------------------------------------------------------------------------------
  data.table + dplyr code now lives in dtplyr.
  Please library(dtplyr)!
  ------------------------------------------------------------------------------
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:data.table':
  
      between, first, last
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > library(dtplyr)
  > library(magrittr)
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  > library(survey)
  Loading required package: grid
  Loading required package: Matrix
  Loading required package: survival
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  > library(zoo)
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  > 
  > test_check("grattan")
  1. Error: Returns correct values (@test_aus_pop_qtr.R#4) -----------------------
  Failed to connect to stat.data.abs.gov.au port 80: Operation timed out
  1: expect_equal(round(aus_pop_qtr("2000-Q1", allow.projections = FALSE, fertility = "high", 
         mortality = "high.LifeExpectancy"), -4), 18990000) at testthat/test_aus_pop_qtr.R:4
  2: compare(object, expected, ...)
  3: aus_pop_qtr("2000-Q1", allow.projections = FALSE, fertility = "high", mortality = "high.LifeExpectancy")
  4: "http://stat.data.abs.gov.au/restsdmx/sdmx.ashx/GetData/ERP_QUARTERLY/1.0.3.TT.Q/ABS?startTime=1981" %>% 
         rsdmx::readSDMX(.) %>% as.data.frame %>% as.data.table %>% .[, .(obsTime, obsValue)]
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: function_list[[i]](value)
  11: rsdmx::readSDMX(.)
  12: RCurl::getURL(file, httpheader = list(`User-Agent` = rsdmxAgent), ssl.verifypeer = FALSE, 
         .encoding = "UTF-8", headerfunction = h$update)
  13: curlPerform(curl = curl, .opts = opts, .encoding = .encoding)
  14: function (type, msg, asError = TRUE) 
     {
         if (!is.character(type)) {
             i = match(type, CURLcodeValues)
             typeName = if (is.na(i)) 
                 character()
             else names(CURLcodeValues)[i]
         }
         typeName = gsub("^CURLE_", "", typeName)
         fun = (if (asError) 
             stop
         else warning)
         fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", 
             "error", "condition")))
     }(7L, "Failed to connect to stat.data.abs.gov.au port 80: Operation timed out", TRUE)
  
  2. Error: ABS connection (@test_cpi.R#38) --------------------------------------
  Failed to connect to stat.data.abs.gov.au port 80: Operation timed out
  1: expect_equal(cpi_inflator(from_fy = "2010-11", to_fy = "2011-12", adjustment = "none"), 
         cpi_inflator(from_fy = "2010-11", to_fy = "2011-12", useABSConnection = TRUE, 
             adjustment = "none")) at testthat/test_cpi.R:38
  2: compare(object, expected, ...)
  3: compare.numeric(object, expected, ...)
  4: all.equal(x, y, tolerance = tolerance, ...)
  5: all.equal.numeric(x, y, tolerance = tolerance, ...)
  6: attr.all.equal(target, current, tolerance = tolerance, scale = scale, ...)
  7: mode(current)
  8: cpi_inflator(from_fy = "2010-11", to_fy = "2011-12", useABSConnection = TRUE, adjustment = "none")
  9: rsdmx::readSDMX(url)
  10: RCurl::getURL(file, httpheader = list(`User-Agent` = rsdmxAgent), ssl.verifypeer = FALSE, 
         .encoding = "UTF-8", headerfunction = h$update)
  11: curlPerform(curl = curl, .opts = opts, .encoding = .encoding)
  12: function (type, msg, asError = TRUE) 
     {
         if (!is.character(type)) {
             i = match(type, CURLcodeValues)
             typeName = if (is.na(i)) 
                 character()
             else names(CURLcodeValues)[i]
         }
         typeName = gsub("^CURLE_", "", typeName)
         fun = (if (asError) 
             stop
         else warning)
         fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", 
             "error", "condition")))
     }(7L, "Failed to connect to stat.data.abs.gov.au port 80: Operation timed out", TRUE)
  
  3. Error: ABS connection (@test_lf_inflator.R#45) ------------------------------
  Failed to connect to stat.data.abs.gov.au port 80: Operation timed out
  1: expect_equal(lf_inflator(from_date = c("1981-01-01", "1981-02-01"), to_date = c("1981-02-01", 
         "1981-01-01"), useABSConnection = TRUE), c(1.00124729250057, 0.998754261299966), 
         tol = 0.001) at testthat/test_lf_inflator.R:45
  2: compare(object, expected, ...)
  3: lf_inflator(from_date = c("1981-01-01", "1981-02-01"), to_date = c("1981-02-01", 
         "1981-01-01"), useABSConnection = TRUE)
  4: rsdmx::readSDMX(lf.url.trend)
  5: RCurl::getURL(file, httpheader = list(`User-Agent` = rsdmxAgent), ssl.verifypeer = FALSE, 
         .encoding = "UTF-8", headerfunction = h$update)
  6: curlPerform(curl = curl, .opts = opts, .encoding = .encoding)
  7: function (type, msg, asError = TRUE) 
     {
         if (!is.character(type)) {
             i = match(type, CURLcodeValues)
             typeName = if (is.na(i)) 
                 character()
             else names(CURLcodeValues)[i]
         }
         typeName = gsub("^CURLE_", "", typeName)
         fun = (if (asError) 
             stop
         else warning)
         fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", 
             "error", "condition")))
     }(7L, "Failed to connect to stat.data.abs.gov.au port 80: Operation timed out", TRUE)
  
  4. Error: ABS connection (@test_wage_inflator.R#16) ----------------------------
  Failed to connect to stat.data.abs.gov.au port 80: Operation timed out
  1: wage_inflator(1, from_fy = "2001-02", to_fy = "2002-03", useABSConnection = TRUE) at testthat/test_wage_inflator.R:16
  2: rsdmx::readSDMX(wage.url)
  3: RCurl::getURL(file, httpheader = list(`User-Agent` = rsdmxAgent), ssl.verifypeer = FALSE, 
         .encoding = "UTF-8", headerfunction = h$update)
  4: curlPerform(curl = curl, .opts = opts, .encoding = .encoding)
  5: function (type, msg, asError = TRUE) 
     {
         if (!is.character(type)) {
             i = match(type, CURLcodeValues)
             typeName = if (is.na(i)) 
                 character()
             else names(CURLcodeValues)[i]
         }
         typeName = gsub("^CURLE_", "", typeName)
         fun = (if (asError) 
             stop
         else warning)
         fun(structure(list(message = msg, call = sys.call()), class = c(typeName, "GenericCurlError", 
             "error", "condition")))
     }(7L, "Failed to connect to stat.data.abs.gov.au port 80: Operation timed out", TRUE)
  
  testthat results ================================================================
  OK: 185 SKIPPED: 29 FAILED: 4
  1. Error: Returns correct values (@test_aus_pop_qtr.R#4) 
  2. Error: ABS connection (@test_cpi.R#38) 
  3. Error: ABS connection (@test_lf_inflator.R#45) 
  4. Error: ABS connection (@test_wage_inflator.R#16) 
  
  Error: testthat unit tests failed
  Execution halted