From b332f2ed50d4b0bf0b918f2099cc5be587584221 Mon Sep 17 00:00:00 2001 From: Fendy Heryanto Date: Wed, 28 Jan 2026 10:02:57 +0000 Subject: [PATCH] really fix the batching logic --- tests/playwright/setup/demoTable.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/playwright/setup/demoTable.ts b/tests/playwright/setup/demoTable.ts index 06633aadd0..6d1794c729 100644 --- a/tests/playwright/setup/demoTable.ts +++ b/tests/playwright/setup/demoTable.ts @@ -269,13 +269,8 @@ async function createDemoTable({ } const BATCH_SIZE = 100; - for (let i = 0; i < rowAttributes.length; i++) { - await api.dbTableRow.bulkCreate( - 'noco', - context.base.id, - table.id, - rowAttributes.slice(i * BATCH_SIZE, i * BATCH_SIZE + BATCH_SIZE) - ); + for (let i = 0; i < rowAttributes.length; i += BATCH_SIZE) { + await api.dbTableRow.bulkCreate('noco', context.base.id, table.id, rowAttributes.slice(i, i + BATCH_SIZE)); } return table; }