[wp-trac] [WordPress Trac] #37371: Reduce reliance on rand_str() in tests

WordPress Trac noreply at wordpress.org
Thu Jul 14 21:57:25 UTC 2016


#37371: Reduce reliance on rand_str() in tests
------------------------------+----------------------------
 Reporter:  johnbillion       |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Future Release
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:  needs-patch
  Focuses:                    |
------------------------------+----------------------------
 39 of core's tests rely on `rand_str()` returning a different value each
 time it's called in order to pass. It's entirely possible that
 `rand_str()` could return an identical value twice, and therefore the test
 would randomly (ho ho) fail.

 Let's remove all the unnecessary uses of `rand_str()`, where a fixed
 string would suffice. This will also shave off some milliseconds.

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


More information about the wp-trac mailing list