File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
r/adbcdrivermanager/tests/testthat Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -86,14 +86,16 @@ test_that("async tasks can set an R callback", {
86
86
87
87
# Ensure the callback runs even if the task is already finished
88
88
async_called <- FALSE
89
- sleep_task <- adbc_async_sleep(1 )
89
+ sleep_task <- adbc_async_sleep(0 )
90
+ Sys.sleep(0.1 )
90
91
adbc_async_task_set_callback(sleep_task , function (x ) { async_called <<- TRUE })
91
92
Sys.sleep(0.1 )
92
93
expect_true(async_called )
93
94
94
95
# Ensure this also works on error
95
96
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 )
97
99
adbc_async_task_set_callback(
98
100
sleep_task ,
99
101
resolve = function (x ) NULL ,
You can’t perform that action at this time.
0 commit comments