Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip k6 api batch update when batch create fails #38282

Merged
merged 1 commit into from May 15, 2023

Conversation

rrennick
Copy link
Contributor

Changes proposed in this Pull Request:

When running K6 tests I was seeing lots of the following error:

ERRO[0595] TypeError: Cannot read property '0' of undefined
Run    [at file:///Users/nobody/Sites/wc/wp-content/woocommerce/plugins/woocommerce/tests/performance/requests/api/orders.js:191:22(14)
	at go.k6.io/k6/js/modules/k6.(*K6).Group-fm (native)
	at ordersAPI (file:///Users/nobody/Sites/wc/wp-content/woocommerce/plugins/woocommerce/tests/performance/requests/api/orders.js:186:8(186))
	at allAPIFlow (file:///Users/nobody/Sites/wc/wp-content/woocommerce/plugins/woocommerce/tests/performance/tests/wc-baseline-load.js:329:1(4))

This PR adds a check to ensure that the batch add request returned a list of order IDs.

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. In the plugins/woocommerce folder, run pnpm run env:dev --filter=woocommerce
  2. Run pnpm run env:performance-init --filter=woocommerce
  3. In the tests/performance folder, run k6 run tests/wc-baseline-load.js
  4. Test suite should run successfully without logging the errors above.

@github-actions github-actions bot added focus: performance tests The issue/PR is release to performance testing. plugin: woocommerce Issues related to the WooCommerce Core plugin. labels May 12, 2023
@rrennick rrennick requested a review from a team May 12, 2023 16:24
@github-actions
Copy link
Contributor

Hi , @woocommerce/solaris

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

@rrennick rrennick added the type: bug The issue is a confirmed bug. label May 12, 2023
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 36202d7

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests26700202691m 2s
E2E Tests1890010019917m 19s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

Copy link
Contributor

@nigeljamesstevenson nigeljamesstevenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update - thanks @rrennick !

@nigeljamesstevenson nigeljamesstevenson merged commit c190f97 into trunk May 15, 2023
20 checks passed
@nigeljamesstevenson nigeljamesstevenson deleted the fix/k6-api-batch-orders branch May 15, 2023 10:16
@github-actions github-actions bot added this to the 7.8.0 milestone May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: performance tests The issue/PR is release to performance testing. plugin: woocommerce Issues related to the WooCommerce Core plugin. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants