[R-pkg-team] Bug#1104495: #1104495 r-cran-httr2 intermittent test failures on riscv64

Rebecca N. Palmer rebecca_palmer at zoho.com
Sun May 4 20:01:25 BST 2025


Control: tags -1 patch

I agree this is probably caused by the timeout being too short for slow 
hardware (such as the current riscv64 test runners).  My (untested) 
attempt to increase the timeout is below.

It's *not* an urgent problem, as retrying failures usually works.

 > Indeed it seems that there is a timeout of 30s

Where did you find 30s?  The places I've seen timeout errors are:
- Timeout of 1s at 
https://sources.debian.org/src/r-cran-httr2/1.1.1-1/tests/testthat/test-req-perform-parallel.R/?hl=28#L17
- Timeout starting the test server (in various tests), which seems to 
use the default of 5s: 
https://sources.debian.org/src/r-cran-httr2/1.1.1-1/R/test.R/#L54 
https://sources.debian.org/src/r-cran-webfakes/1.3.2-1/R/app-process.R/?hl=91#L89

 > some of the failures were synchronised on some architecture (like
 > failing on the same day in amd64 and arm64)

What does this refer to?  I don't see any failures on those, except when 
there was (plausibly) a real bug (e.g. r-cran-rlang/1.1.5-2).

 > so it may be network
 > issues that are not solvable by changing the timeout.

Probably not: the failing tests are ones that use a local test server, 
not the actual internet.

--- a/R/test.R
+++ b/R/test.R
@@ -53,7 +53,8 @@ example_app <- function() {

    webfakes::new_app_process(
      app,
-    opts = webfakes::server_opts(num_threads = 20, enable_keep_alive = 
TRUE)
+    opts = webfakes::server_opts(num_threads = 20, enable_keep_alive = 
TRUE),
+    process_timeout = 10000 # ms, default is 5000
    )
  }

--- a/tests/testthat/test-req-perform-parallel.R
+++ b/tests/testthat/test-req-perform-parallel.R
@@ -18,14 +18,14 @@ test_that("requests happen in parallel", {
    # test works best if webfakes has ample threads and keepalive
    reqs <- list2(
      request_test("/delay/:secs", secs = 0),
-    request_test("/delay/:secs", secs = 0.25),
-    request_test("/delay/:secs", secs = 0.25),
-    request_test("/delay/:secs", secs = 0.25),
-    request_test("/delay/:secs", secs = 0.25),
-    request_test("/delay/:secs", secs = 0.25),
+    request_test("/delay/:secs", secs = 0.5),
+    request_test("/delay/:secs", secs = 0.5),
+    request_test("/delay/:secs", secs = 0.5),
+    request_test("/delay/:secs", secs = 0.5),
+    request_test("/delay/:secs", secs = 0.5),
    )
    time <- system.time(req_perform_parallel(reqs))
-  expect_lt(time[[3]], 1)
+  expect_lt(time[[3]], 2)
  })

  test_that("can perform >128 file uploads in parallel", {



More information about the R-pkg-team mailing list