[wp-trac] [WordPress Trac] #29785: User count not correct

WordPress Trac noreply at wordpress.org
Sat Aug 27 07:21:02 UTC 2016


#29785: User count not correct
-------------------------------------------------+-------------------------
 Reporter:  psoluch                              |       Owner:
     Type:  defect (bug)                         |  boonebgorges
 Priority:  normal                               |      Status:  assigned
Component:  Users                                |   Milestone:  Future
 Severity:  normal                               |  Release
 Keywords:  good-first-bug has-unit-tests has-   |     Version:
  patch                                          |  Resolution:
                                                 |     Focuses:
                                                 |  performance
-------------------------------------------------+-------------------------
Changes (by dots):

 * keywords:  needs-patch needs-unit-tests good-first-bug => good-first-bug
     has-unit-tests has-patch


Comment:

 I have modified the query and tested all the cases mentioned by
 @boonebgorges in #4 and I have made the PHP unit test and below are the
 results from the PHP unit test


 {{{
 C:\wamp\www\wordpress-core>phpunit tests/phpunit/tests/user/countUsers.php
 Installing...
 Running as single site... To run multisite, use -c
 tests/phpunit/multisite.xml
 Not running ajax tests. To execute these, use --group ajax.
 Not running ms-files tests. To execute these, use --group ms-files.
 Not running external-http tests. To execute these, use --group external-
 http.
 PHPUnit 4.1.6 by Sebastian Bergmann.

 Configuration read from C:\wamp\www\wordpress-core\phpunit.xml.dist

 ..←[36;1mS←[0m←[36;1mS←[0m..

 You should really fix these slow tests (>150ms)...
  1. 598ms to run Tests_User_CountUsers:test_count_users_is_accurate with
 data se
 t #0
  2. 373ms to run Tests_User_CountUsers:test_count_users_is_accurate with
 data se
 t #1
  3. 187ms to run
 Tests_User_CountUsers:test_count_users_is_accurate_with_multipl
 e_roles with data set #0


 Time: 41.02 seconds, Memory: 30.50MB

 ←[30;43mOK, but incomplete, skipped, or risky tests!←[0m
 ←[30;43mTests: 6, Assertions: 10, Skipped: 2.       ←[0m

 C:\wamp\www\wordpress-core>
 }}}

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


More information about the wp-trac mailing list