[wp-trac] [WordPress Trac] #51109: Random term meta test failures

WordPress Trac noreply at wordpress.org
Sun Aug 23 03:32:12 UTC 2020


#51109: Random term meta test failures
------------------------------+---------------------
 Reporter:  SergeyBiryukov    |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  5.6
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+---------------------

Comment (by SergeyBiryukov):

 If looks like [48840] is not the culprit per se, it just uncovered the
 fact that the failing test was fragile in the first place.

 Specifically, the test ensures that metadata for an orphan term is not
 lazy loaded, because it's not attached to any posts. However, but the time
 the test runs, the `WP_Metadata_Lazyloader` queue contains quite a few IDs
 from previous tests, one of which can coincide with the orphan term ID
 from this test. When that happens, the term meta is retrieved from the
 cache and not from the database, as the test attempts to verify.

 Clearing the lazyloader queue at the beginning of the test appears to
 resolve the issue.

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


More information about the wp-trac mailing list