Fix failing test due to concurrent product creation (#48989)
* Fix test due to concurrent product creation * Add changefile(s) from automation for the following project(s): woocommerce
This commit is contained in:
parent
97f8f863d1
commit
ddc4bddc17
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: No changelog entry is required, as this just changes a unit test to workaround an issue.
|
||||
|
|
@ -16,34 +16,9 @@ class WC_REST_Product_Custom_Fields_Controller_Tests extends WC_REST_Unit_Test_C
|
|||
* @return void
|
||||
*/
|
||||
public static function wpSetUpBeforeClass() {
|
||||
self::$products[] = WC_Helper_Product::create_simple_product(
|
||||
true,
|
||||
array(
|
||||
'name' => 'Pancake',
|
||||
'sku' => 'pancake-1',
|
||||
)
|
||||
);
|
||||
self::$products[] = WC_Helper_Product::create_simple_product(
|
||||
true,
|
||||
array(
|
||||
'name' => 'Waffle 1',
|
||||
'sku' => 'pancake-2',
|
||||
)
|
||||
);
|
||||
self::$products[] = WC_Helper_Product::create_simple_product(
|
||||
true,
|
||||
array(
|
||||
'name' => 'French Toast',
|
||||
'sku' => 'waffle-2',
|
||||
)
|
||||
);
|
||||
self::$products[] = WC_Helper_Product::create_simple_product(
|
||||
true,
|
||||
array(
|
||||
'name' => 'Waffle 3',
|
||||
'sku' => 'waffle-3',
|
||||
)
|
||||
);
|
||||
for ( $i = 1; $i <= 4; $i ++ ) {
|
||||
self::$products[] = WC_Helper_Product::create_simple_product();
|
||||
}
|
||||
|
||||
foreach ( self::$products as $product ) {
|
||||
for ( $i = 0; $i < 20; $i++ ) {
|
||||
|
|
Loading…
Reference in New Issue