Opened 7 years ago
Closed 7 years ago
#7709 closed enhancement (fixed)
Unit Tests: Speed up multisite specific test
Reported by: | r-a-y | Owned by: | netweb |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.2 |
Component: | Build/Test Tools | Keywords: | has-patch |
Cc: |
Description
One of our multisite unit tests was slowing things down considerably - test_bp_core_get_directory_pages_multisite_delete_post_with_same_bp_page_id()
.
I introduced this in #6226. Basically, the test would create new posts in a loop(!) until it reached a certain page ID on a sub-site.
There is a much more efficient way of doing this by using a not-well-documented parameter in wp_insert_post()
called 'import_id'
. Setting 'import_id'
will just use the post ID we want to use.
Going to commit.
Attachments (1)
Change History (2)
Note: See
TracTickets for help on using
tickets.
In 11880: