WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#40283 closed defect (bug) (fixed)

Add missing global cache groups in tests

Reported by: jeremyfelt Owned by: jeremyfelt
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Cache API Keywords: has-patch
Focuses: multisite Cc:

Description

Several global cache groups are missing from WP_UnitTestCase::flush_cache(), which can cause some fun cross-test confusion when running multisite tests with object cache enabled.

Previously, [1332/tests]

Attachments (1)

40283.diff (1.7 KB) - added by jeremyfelt 5 months ago.

Download all attachments as: .zip

Change History (3)

@jeremyfelt
5 months ago

#1 @jeremyfelt
5 months ago

  • Owner set to jeremyfelt
  • Status changed from new to assigned

40283.diff adds useremail, userslugs, networks, sites, site-details groups to both WP_UnitTestCase::flush_cache() and Tests_Cache::init_cache(). It's less necessary in the cache tests, but doesn't hurt to be consistent.

#2 @jeremyfelt
5 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40343:

Tests: Add missing global cache groups.

Add useremail, userslugs, networks, sites, and site-details as global cache groups when added with unit tests. This aligns the list with the core default.

Fixes #40283.

Note: See TracTickets for help on using tickets.