[wp-trac] [WordPress Trac] #30336: microtime returning a string causes false test failures
WordPress Trac
noreply at wordpress.org
Mon May 1 23:42:18 UTC 2017
#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:
------------------------------+---------------------
Comment (by johnbillion):
In [changeset:"40566"]:
{{{
#!CommitTicketReference repository="" revision="40566"
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.
See #30336
Merges [30337] to the 4.0 branch.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30336#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list