[wp-trac] [WordPress Trac] #30336: microtime returning a string causes false test failures
WordPress Trac
noreply at wordpress.org
Thu Nov 13 22:03:17 UTC 2014
#30336: microtime returning a string causes false test failures
------------------------------+---------------------
Reporter: jorbin | Owner: jorbin
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.1
Component: Build/Test Tools | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses:
------------------------------+---------------------
Changes (by jorbin):
* owner: => jorbin
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"30337"]:
{{{
#!CommitTicketReference repository="" revision="30337"
When asserting microtime output as a number, make it a number
microtime is by default a string. Doing a greater then or less than check
of that string is a bad idea since it uses the first part (the micro part
of microtime) rather then the actual time. This adds a helper to convert
microtime output into a float which we can then use to properly compare
the output of microtime.
This fixes an intermittent test failure.
fixes #30336
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30336#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list