You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the unit tests on the module and got a random failure in the section should renew the item's timeout on every single 'get'. The assertion is too narrow. For example, timeout + timeout * 4/3 = 233.3333...., while you check that new Date().getTime() - now = 233 should be greater. Since the value's precision is not high enough, it does not account for the 0.3333 nanoseconds, it may be greater if and only if the time required to run the test is greater than 5000 nanoseconds. This is not the case on fast computers. Therefore, the test is fails.
You should round down the value and check for "greater or equal" instead :
I ran the unit tests on the module and got a random failure in the section
should renew the item's timeout on every single 'get'
. The assertion is too narrow. For example,timeout + timeout * 4/3 = 233.3333....
, while you check thatnew Date().getTime() - now = 233
should be greater. Since the value's precision is not high enough, it does not account for the0.3333
nanoseconds, it may be greater if and only if the time required to run the test is greater than5000
nanoseconds. This is not the case on fast computers. Therefore, the test is fails.You should round down the value and check for "greater or equal" instead :
The same thing happens for the test case
should expire an item by timeout
where the testshould be
for the same reason.
The text was updated successfully, but these errors were encountered: