From 1125462df72b50509286873607cc98f09d19523c Mon Sep 17 00:00:00 2001 From: Dewey Dunnington Date: Wed, 14 Sep 2022 09:10:44 -0300 Subject: [PATCH] make the test less funny and less confusing --- r/tests/testthat/test-query-engine.R | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/r/tests/testthat/test-query-engine.R b/r/tests/testthat/test-query-engine.R index dce93f72306a6..f2190eb668400 100644 --- a/r/tests/testthat/test-query-engine.R +++ b/r/tests/testthat/test-query-engine.R @@ -60,25 +60,15 @@ test_that("ExecPlanReader evaluates head() lazily", { }) test_that("ExecPlanReader evaluates head() lazily", { - # make a 500-row RecordBatchReader + # Make a rather long RecordBatchReader reader <- RecordBatchReader$create( batches = rep( - list( - record_batch( - line = c( - "this is the RecordBatchReader that never ends", - "yes it goes on and on my friends", - "some ExecPlan started pulling from it", - "not knowing what it was, and hopefully won't", - "continue pulling on forever just because" - ) - ) - ), + list(record_batch(line = letters)), 100L ) ) - # But only get 10 rows from it + # ...But only get 10 rows from it query <- head(as_adq(reader), 10) expect_identical(as_arrow_table(query)$num_rows, 10L)