Skip to content

Commit

Permalink
Update r/adbcdrivermanager/tests/testthat/test-async.R
Browse files Browse the repository at this point in the history
Co-authored-by: Kirill Müller <[email protected]>
  • Loading branch information
paleolimbot and krlmlr committed Sep 5, 2023
1 parent 45d277d commit f21d03d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion r/adbcdrivermanager/tests/testthat/test-async.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@

test_that("aync array_stream$get_next", {
stream <- nanoarrow::basic_array_stream(list(1:5))
async_called <- FALSE
queue <- adbc_array_stream_get_next_async(stream, function(array) {
async_called <<- TRUE
expect_identical(nanoarrow::convert_array(array), 1:5)
})

Sys.sleep(0.5)
expect_false(async_called)
expect_identical(adbc_callback_queue_run_pending(queue), 1)
expect_true(async_called)
})

0 comments on commit f21d03d

Please sign in to comment.