R-processx/4e3715af514b0187bd47d87e8fd99e17ad1d341c.patch
2020-02-12 03:25:35 -05:00

45 lines
1.1 KiB
Diff

From 4e3715af514b0187bd47d87e8fd99e17ad1d341c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= <csardi.gabor@gmail.com>
Date: Tue, 11 Feb 2020 11:47:46 +0000
Subject: [PATCH] Skip curl fd poll test if offline
Closes #226.
---
tests/testthat/test-poll-curl.R | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/testthat/test-poll-curl.R b/tests/testthat/test-poll-curl.R
index f0be69c..dff055e 100644
--- a/tests/testthat/test-poll-curl.R
+++ b/tests/testthat/test-poll-curl.R
@@ -2,10 +2,12 @@
context("poll-curl")
## To resolve....
-httpbin()
+online <- curl::has_internet()
+if (online) httpbin()
test_that("curl fds", {
skip_on_cran()
+ if (!online) skip("Offline")
resp <- list()
errm <- character()
@@ -55,6 +57,7 @@ test_that("curl fds", {
test_that("curl fds before others", {
skip_on_cran()
+ if (!online) skip("Offline")
pool <- curl::new_pool()
url <- httpbin("/delay/1")
@@ -86,6 +89,7 @@ test_that("curl fds before others", {
test_that("process fd before curl fd", {
skip_on_cran()
+ if (!online) skip("Offline")
pool <- curl::new_pool()
url <- httpbin("/delay/1")