• Adam Simpkins's avatar
    on non-Linux platforms allow 20ms of extra leeway on timeout checks · 16a7ef38
    Adam Simpkins authored
    Summary:
    In the folly/io/async tests, allow an extra 20ms of tolerance when performing
    timeout checks on non-Linux platforms.
    
    On Linux we can fairly reliably determine the amount of time that the test
    spent waiting to be scheduled on the CPU.  This allows the timeout tests to be
    relatively accurate even on overloaded systems.
    
    On non-Linux platforms we cannot determine the time spent waiting to be
    scheduled, and the `getSchedTimeWaiting()` implementation always returns 0.
    This causes the tests to fail pretty frequently on Mac OS.  Adding an extra
    20ms of tolerance should hopefully help reduce the test failure rate on Mac.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D15464672
    
    fbshipit-source-id: 2c3096df6a15dcdc68bf14c947736e4731929c0f
    16a7ef38
TimeUtil.cpp 8.85 KB