update EventBaseTest to use precise timing with libevent2
Summary: Change the EventBaseTest code to request precise timing from libevent. libevent 2.1+ uses a coarse monotonic clock by default on Linux. This causes several of folly's timing-related tests for EventBase to fail most of the time. This changes the tests to request precise timing from libevent2, using the `EVENT_PRECISE_TIMER`. While we can request this programmatically, doing so portably across libevent versions is awkward, so the environment variable is the easiest solution for now. Alternatively we could change the tests to use larger, coarser timeouts to make them pass reliably. However, this would make the tests slower. Differential Revision: D15528322 fbshipit-source-id: 20dc55de36235e63910cf7fb5b67c6f2d509cc15
Showing
This diff is collapsed.
Please register or sign in to comment