diff --git a/tests/testthat/test-download_d1_data.R b/tests/testthat/test-download_d1_data.R index e624ad8..d98f7a7 100644 --- a/tests/testthat/test-download_d1_data.R +++ b/tests/testthat/test-download_d1_data.R @@ -11,6 +11,9 @@ test_that("accepts correct inputs", { }) test_that("test Arctic Data Center data URL (fully up to date data file)", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570", path = temp_dir) @@ -29,6 +32,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file)", { }) test_that("test Arctic Data Center data URL (fully up to date data file) with one data table", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data("https://cn.dataone.org/cn/v2/resolve/urn:uuid:a2834e3e-f453-4c2b-8343-99477662b570", temp_dir) @@ -47,6 +53,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file) with on }) test_that("test Arctic Data Center data URL (fully up to date data file) with multiple data tables", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/urn:uuid:a4f85031-0b91-4d92-ba0a-b02f216bba64", path = temp_dir) @@ -66,6 +75,9 @@ test_that("test Arctic Data Center data URL (fully up to date data file) with mu }) test_that("Data without metadata downloads and returns summary metadata", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() expect_error(download_d1_data(data_url = "urn:uuid:7bdab6cc-8dc1-4c49-a80b-ca771c18eaa9", path = temp_dir)) @@ -80,6 +92,9 @@ test_that("Data without metadata downloads and returns summary metadata", { #adding a test for a dataset that uses ISO metadata and is from the Alaska Ocean Observing System member node test_that("test data URL with ISO metadata from AOOS member node and with multiple data tables", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- expect_warning(download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/4139539e-94e7-49cc-9c7a-5f879e438b16", path = temp_dir)) @@ -98,6 +113,9 @@ test_that("test data URL with ISO metadata from AOOS member node and with multip #adding a test for a dataset that uses ISO metadata from Research Workspace member node test_that("test data URL with ISO metadata from Research Workspace member node and with multiple data tables", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/f8e4b479-2c85-4cfd-ad69-4aa059b58a92", path = temp_dir) @@ -116,6 +134,9 @@ test_that("test data URL with ISO metadata from Research Workspace member node a # EDI data test test_that("test EDI data URL (fully up to date data file) with multiple data tables", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/https%3A%2F%2Fpasta.lternet.edu%2Fpackage%2Fdata%2Feml%2Fedi%2F746%2F1%2F2eac05447c1141bc8942284dfb32643c", path = temp_dir) @@ -136,6 +157,9 @@ test_that("test EDI data URL (fully up to date data file) with multiple data tab # Another EDI test test_that("test EDI data URL (fully up to date data file, eml v2.2.0) with one data table", { + # Takes too much time and add load on servers + skip_on_cran() + temp_dir <- tempdir() out <- download_d1_data(data_url = "https://cn.dataone.org/cn/v2/resolve/https%3A%2F%2Fpasta.lternet.edu%2Fpackage%2Fdata%2Feml%2Fedi%2F858%2F1%2F15ad768241d2eeed9f0ba159c2ab8fd5", path = temp_dir)