Skip to content

Commit 50d6d3f

Browse files
committed
see if waiting a little more is more reliable on CI
1 parent 01cfa54 commit 50d6d3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

r/adbcdrivermanager/tests/testthat/test-async.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ test_that("async tasks can set an R callback", {
8686

8787
# Ensure the callback runs even if the task is already finished
8888
async_called <- FALSE
89-
sleep_task <- adbc_async_sleep(1)
89+
sleep_task <- adbc_async_sleep(0)
90+
Sys.sleep(0.1)
9091
adbc_async_task_set_callback(sleep_task, function(x) { async_called <<- TRUE })
9192
Sys.sleep(0.1)
9293
expect_true(async_called)
9394

9495
# Ensure this also works on error
9596
async_called <- FALSE
96-
sleep_task <- adbc_async_sleep(1, error_message = "some error")
97+
sleep_task <- adbc_async_sleep(0, error_message = "some error")
98+
Sys.sleep(0.1)
9799
adbc_async_task_set_callback(
98100
sleep_task,
99101
resolve = function(x) NULL,

0 commit comments

Comments
 (0)