[wp-trac] [WordPress Trac] #37308: `wp_insert_user()` test failing due to database autoincrement

WordPress Trac noreply at wordpress.org
Thu Jul 7 16:43:02 UTC 2016


#37308: `wp_insert_user()` test failing due to database autoincrement
--------------------------+---------------------------
 Reporter:  boonebgorges  |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.6
Component:  Users         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------------

Comment (by boonebgorges):

 > By the time the suite gets to test_wp_insert_user_with_invalid_user_id()
 (after about 5900 tests), there are 6 users in the wp_users table. This
 means that some tests are not cleaning up their mess.

 I was wrong about the leakage - the users are created in
 `setUpBeforeClass()`. It just so happens that one of them has the ID 123,
 because of the database autoincrement. Fixing the first bullet point
 should be enough.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37308#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list