Skip to content

Commit

Permalink
Retry up to 3 times
Browse files Browse the repository at this point in the history
  • Loading branch information
ldecicco-USGS committed Oct 20, 2024
1 parent ac61269 commit 3a3773f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/getWebServiceData.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ getWebServiceData <- function(obs_url, ...) {
trys <- 1
if (all(grepl("ERROR: INCOMPLETE DATA", returnedDoc))) {

while(trys <= 5){
while(trys <= 3){
message("Trying again!")
obs_url <- paste0(obs_url, "&try=", trys)
returnedList <- retryGetOrPost(obs_url)
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/tests_general.R
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ test_that("internal functions", {
})

test_that("profiles", {

testthat::skip_on_cran()
# Data profiles: "Organization Data"
org_data <- readWQPdata(
statecode = "WI",
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/tests_userFriendly_fxns.R
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ test_that("WQP qw tests", {
df <- readWQPqw("USGS-04193500", parameterCd = "00665")
expect_true(nrow(df) > 0)

df2 <- readWQPqw("USGS-05427718", parameterCd = "all")
expect_true(nrow(df2) > 0)
})

context("readNWISstat tests")
Expand Down

0 comments on commit 3a3773f

Please sign in to comment.