diff --git a/R/sim_utils.R b/R/sim_utils.R index 9dd98f6213eaa701ff118dbdfb5fd46ad2898934..db7b80ef58f3b7d3d6d4023c7cdbab0a3827a7e3 100644 --- a/R/sim_utils.R +++ b/R/sim_utils.R @@ -251,7 +251,6 @@ ogs6_read_output_files <- function(ogs6_obj){ while(((length(pvd_paths) == 0) | any(file.size(pvd_paths) <= 64)) & difftime(Sys.time(), t0, units = "secs") < 2) { Sys.sleep(0.01) - warning("waiting for pvd file ...") } if (((length(pvd_paths) == 0) | any(file.size(pvd_paths) <= 64))) { stop("Output file not written out correctly. diff --git a/tests/testthat/test-sim_utils.R b/tests/testthat/test-sim_utils.R index 8cfd42bacf29b323c0bcf67acc2536b1e18841d8..e820924cbfa872f582c3cb41a9049ded1ec430ae 100644 --- a/tests/testthat/test-sim_utils.R +++ b/tests/testthat/test-sim_utils.R @@ -93,7 +93,18 @@ test_that("Nonexistent *.pvd file yields an appropriate error", { }) +test_that("Small *.pvd file yields an appropriate error", { + sim_path <- paste0(tmp_dir, "/run_simulation_test") + dir.create(sim_path) + d <- NULL + save(d, file = paste0(sim_path, "/null.pvd")) + + # create empty ogs6 object + ogs6_obj <- OGS6$new(sim_name = "sim", sim_path = sim_path) + expect_error(ogs6_read_output_files(ogs6_obj)) + unlink(sim_path, recursive = TRUE) +}) #===== Test benchmarks =====