Opened 9 years ago
Closed 9 years ago
#7709 closed enhancement (fixed)
Unit Tests: Speed up multisite specific test
| Reported by: | r-a-y | Owned by: | netweb |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | Build/Test Tools | Version: | 2.2 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 11880: