Skip to content

Commit f21d03d

Browse files
paleolimbotkrlmlr
andcommitted
Update r/adbcdrivermanager/tests/testthat/test-async.R
Co-authored-by: Kirill Müller <[email protected]>
1 parent 45d277d commit f21d03d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@
1717

1818
test_that("aync array_stream$get_next", {
1919
stream <- nanoarrow::basic_array_stream(list(1:5))
20+
async_called <- FALSE
2021
queue <- adbc_array_stream_get_next_async(stream, function(array) {
22+
async_called <<- TRUE
2123
expect_identical(nanoarrow::convert_array(array), 1:5)
2224
})
2325

24-
Sys.sleep(0.5)
26+
expect_false(async_called)
2527
expect_identical(adbc_callback_queue_run_pending(queue), 1)
28+
expect_true(async_called)
2629
})

0 commit comments

Comments
 (0)