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

WordPress Trac noreply at wordpress.org
Thu Jul 7 15:19:25 UTC 2016


#37308: `wp_insert_user()` test failing due to database autoincrement
--------------------------+-----------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.6
Component:  Users         |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------
 For about a week (since [37905] for me, though it's largely
 inconsequential), `Tests_User::test_wp_insert_user_with_invalid_user_id()`
 has been failing for me. The reason is that the ID `123` is hardcoded
 there, but there is an existing user in the installation with the ID
 `123`. There are two problems:

 - If the point of `test_wp_insert_user_with_invalid_user_id()` is to test
 a truly invalid ID, it should check for the ID's invalidity first. This is
 an easy fix.
 - 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'll see if I can track it down.

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


More information about the wp-trac mailing list