[wp-trac] [WordPress Trac] #37046: Unit test initial setup fails if plugins added tables with foreign key constraints
WordPress Trac
noreply at wordpress.org
Wed Jun 8 03:03:18 UTC 2016
#37046: Unit test initial setup fails if plugins added tables with foreign key
constraints
------------------------------+---------------------
Reporter: javorszky | Owner: pento
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
------------------------------+---------------------
Changes (by pento):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"37654"]:
{{{
#!CommitTicketReference repository="" revision="37654"
Tests: Disable `foreign_key_checks` while dropping existing tables.
To ensure a clean run, the test suite drops all tables before installing,
by simply looping over the table list and dropping them if they exist.
This works well for Core, but may fail when a plugin has created a table
with foreign key constraints in a previous test run.
Many plugins choose to base their test suite on the Core setup, so making
life easier for them is a plus, even if Core doesn't directly need this
change.
Props javorszky.
Fixes #37046.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37046#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list