[buddypress-trac] [BuddyPress Trac] #6540: Multisite unit tests and bp_blogs_record_existing_blogs()

buddypress-trac noreply at wordpress.org
Mon Jun 29 21:42:44 UTC 2015

#6540: Multisite unit tests and bp_blogs_record_existing_blogs()
 Reporter:  imath                  |       Owner:  boonebgorges
     Type:  defect (bug)           |      Status:  closed
 Priority:  normal                 |   Milestone:  2.4
Component:  Tools - Unit Tests     |     Version:
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch 2nd-opinion  |
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


 In [changeset:"9980"]:
 #!CommitTicketReference repository="" revision="9980"
 More targeted cleanup for unit tests that use

 `bp_blogs_record_existing_blogs()` uses `TRUNCATE`, which closes the MySQL
 transaction started by the WP automated test suite. As a result, fixtures
 created before the `TRUNCATE` are not properly rolled back during
 Previously, the workaround for the problem had been heavy-handed: the
 deletion of certain content during every test setup/teardown. The new
 is to detect when a known autocommit has taken place - as it does in
 `bp_blogs_record_existing_blogs()` - and to do a more targeted cleanup
 only in
 these cases.

 This allows us to dispense with various instances of blog fixture cleanup
 existing tests.

 Fixes #6540.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6540#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list