Running ‘test-all.R’ [5s/5s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > library("RObsDat")
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  > if(require(testthat)){
  + 	test_package("RObsDat")
  + } else {
  + }
  Loading required package: testthat
  db_engines: Not testing example on PostgreSQL. Use 'options(testPostgreSQL = TRUE)' to do so
  Not testing example on MySQL. Use 'options(testMySQL = TRUE)' to do so
  
  Example with multiple files: SQLite
  SQLite file initiated
  Not testing long example. Use 'options(testLongExample = TRUE)' to do so
  SQLite example processed
  Exiting and deleting RODM.db
  Not testing long example on PostgreSQL. Use 'options(testLongExample = TRUE, testPostgreSQL = TRUE)' to do so
  Not testing long example on MySQL. Use 'options(testLongExample = TRUE, testMySQL = TRUE)' to do so
  
  metadata: ..
  various: 
  addDtV> #connect to database
  addDtV> getDefaultDB()
  Connection closed
  
  addDtV> ## Not run: 
  addDtV> ##D #connect to postgreSQL database
  addDtV> ##D require("RObsDat")
  addDtV> ##D require("RPostgreSQL")
  addDtV> ##D m <- dbDriver("PostgreSQL")
  addDtV> ##D con <- dbConnect(m, user="a_user", password="secret", dbname="obsdat")
  addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
  addDtV> ##D options(odm.handler=sqhandler)
  addDtV> ##D 
  addDtV> ##D #connect to MySQL database
  addDtV> ##D require("RObsDat")
  addDtV> ##D require("RMySQL")
  addDtV> ##D m <- dbDriver("MySQL")
  addDtV> ##D con <- dbConnect(m, user="a_user", password="secret", dbname="obsdat")
  addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
  addDtV> ##D options(odm.handler=sqhandler)
  addDtV> ##D 
  addDtV> ##D #connect to SQLite database
  addDtV> ##D require("RObsDat")
  addDtV> ##D require("RSQLite")
  addDtV> ##D m <- dbDriver("SQLite")
  addDtV> ##D dbname = "database.db"
  addDtV> ##D con <- dbConnect(m, dbname = dbname)
  addDtV> ##D sqhandler <-  new("odm1_1Ver", con=con)
  addDtV> ##D options(odm.handler=sqhandler)
  addDtV> ##D 
  addDtV> ## End(Not run)
  addDtV> 
  addDtV> #Store metadata in database
  addDtV> addSite(Code="test", Name="Virtual test site", x=-5, y=46,
  addDtV+ 	LatLongDatum="WGS84", Elevation=1500, State="Germany")
  W
  addDtV> addVariable(Name="Distance", Unit="cm", ValueType="Field Observation",
  addDtV+ 	GeneralCategory="Instrumentation", Code="test_dist")
  W
  addDtV> addQualityControlLevel(ID=6,Code="test_ok", Definition="The default")
  W
  addDtV> addISOMetadata(TopicCategory="Unknown", Title="Testdata",
  addDtV+ 	Abstract="This data is created to test the functions of RObsDat")
  W
  addDtV> addSource(Organization="Your Org", SourceDescription="Madeup data", 
  addDtV+ 	SourceLink="RObsDat Documentation", ContactName="Yourself",
  addDtV+ 	Metadata="Testdata")
  W
  addDtV> library(xts)
  
  addDtV> library(spacetime)
  
  addDtV> example.data <- xts(1:40, seq(as.POSIXct("2014-01-01", tz="UTC"), 
  addDtV+ 		as.POSIXct("2014-02-09", tz="UTC"), length.out=40))
  
  addDtV> example.data[40] <- 30
  
  addDtV> example.data[35] <- 22
  
  addDtV> addDataValues(example.data[1:20], Site="Virtual test site", Variable="test_dist",  
  addDtV+ 	Source="Madeup", QualityControlLevel="test_ok")
  WWWWWWImporting column  1 out of 1 
  WWWWWWWWWWWWWWWWWWWW
  addDtV> #Avoid duplicates automatically
  addDtV> example.data[15] <- 30
  
  addDtV> addDataValues(example.data, Site="Virtual test site", Variable="test_dist",  
  addDtV+ 	Source="Madeup", QualityControlLevel="test_ok")
  Importing column  1 out of 1 
  
   *** caught segfault ***
  address 0x2, cause 'memory not mapped'
  
  Traceback:
   1: .External("mergeXts", all = all[1:2], fill = fill, setclass = setclass,     symnames = symnames, suffixes = suffixes, retside = retside,     env = new.env(), tzone = tzone, ..., PACKAGE = "xts")
   2: merge.xts(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
   3: merge(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
   4: merge(entriesXtsValues, xts(Value[row.sel, column], order.by = order.date),     join = "right")
   5: addDataValues(example.data, Site = "Virtual test site", Variable = "test_dist",     Source = "Madeup", QualityControlLevel = "test_ok")
   6: eval(ei, envir)
   7: eval(ei, envir)
   8: withVisible(eval(ei, envir))
   9: source(tf, local, echo = echo, prompt.echo = paste0(prompt.prefix,     getOption("prompt")), continue.echo = paste0(prompt.prefix,     getOption("continue")), verbose = verbose, max.deparse.length = Inf,     encoding = "UTF-8", skip.echo = skips, keep.source = TRUE)
  10: example(addDataValues)
  11: eval(code, test_env)
  12: eval(code, test_env)
  13: withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error)
  14: doTryCatch(return(expr), name, parentenv, handler)
  15: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  16: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  17: doTryCatch(return(expr), name, parentenv, handler)
  18: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: tryCatch(withCallingHandlers(eval(code, test_env), expectation = handle_expectation,     skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error), error = function(e) {}, skip = function(e) {})
  21: test_code(desc, code, env = parent.frame())
  22: test_that("NA data does not produce an error", {    on.exit({        cat("Exiting and deleting RODM.db\n")        unlink("RODM.db")    })    example(addDataValues)    example.data <- xts(c(5, 6, NA), seq(as.POSIXct("2012-01-01",         tz = "UTC"), as.POSIXct("2013-01-01", tz = "UTC"), length.out = 3))    addDataValues(example.data, Site = "test", Variable = "test_dist",         Source = "Madeup", QualityControlLevel = "ok")})
  23: eval(exprs, env)
  24: eval(exprs, env)
  25: source_file(path, new.env(parent = env), chdir = TRUE)
  26: force(code)
  27: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  28: FUN(X[[i]], ...)
  29: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  30: force(code)
  31: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  32: test_files(paths, reporter = reporter, env = env, ...)
  33: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  34: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  35: run_tests(package, test_path, filter, reporter, ...)
  36: test_package("RObsDat")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault