Skip to content

Commit 2d614e2

Browse files
authored
Test both limit and batch size speficied (#20)
1 parent b89b0cb commit 2d614e2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/integration/select_test.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,21 @@ add('test_select_all_with_batch_size', function(g)
277277

278278
t.assert_equals(err, nil)
279279
t.assert_equals(objects, customers)
280+
281+
-- batch size 3 and limit 6
282+
local objects, err = g.cluster.main_server.net_box:eval([[
283+
local crud = require('crud')
284+
285+
local objects, err = crud.select('customers', nil, {
286+
batch_size = 3,
287+
limit = 6,
288+
})
289+
290+
return objects, err
291+
]])
292+
293+
t.assert_equals(err, nil)
294+
t.assert_equals(objects, get_by_ids(customers, {1, 2, 3, 4, 5, 6}))
280295
end)
281296

282297
add('test_ge_condition_with_index', function(g)

0 commit comments

Comments
 (0)