Skip to content

Commit

Permalink
skip k6 batch update when batch create fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Rennick committed May 12, 2023
1 parent fabc728 commit 36202d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-k6-api-batch-orders
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

skip k6 batch update when batch create fails
4 changes: 4 additions & 0 deletions plugins/woocommerce/tests/performance/requests/api/orders.js
Expand Up @@ -186,6 +186,10 @@ export function ordersAPI() {
group( 'API Batch Update Orders', function () {
let updateBatchItem;

if ( ! post_ids ) {
return;
}

for ( let index = 0; index < batchSize; index++ ) {
updateBatchItem = {
id: `${ post_ids[ index ] }`,
Expand Down

0 comments on commit 36202d7

Please sign in to comment.