[wp-trac] [WordPress Trac] #55593: Prime caches for post parents in post rest api controller

WordPress Trac noreply at wordpress.org
Wed Jun 15 13:39:46 UTC 2022


#55593: Prime caches for post parents in post rest api controller
--------------------------------------+------------------------------------
 Reporter:  spacedmonkey              |       Owner:  spacedmonkey
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  6.1
Component:  REST API                  |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api, performance
--------------------------------------+------------------------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 It looks like there might be some kind of a race condition in the test:
 {{{
 1) WP_Test_REST_Posts_Controller::test_get_items_parent_ids_primed
 Failed asserting that two arrays are equal.
 --- Expected
 +++ Actual
 @@ @@
  Array (
 -    0 => 1880
 -    1 => 1881
 +    0 => 2003
  )

 /var/www/tests/phpunit/includes/abstract-testcase.php:820
 /var/www/tests/phpunit/tests/rest-api/rest-posts-controller.php:1828
 phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97
 }}}

 See these PHP 7.4 jobs for example:
 https://github.com/WordPress/wordpress-
 develop/runs/6898050638?check_suite_focus=true#step:20:267
 https://github.com/WordPress/wordpress-
 develop/runs/6900501418?check_suite_focus=true#step:20:267

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55593#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list