Commit c3ac4113 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

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
parent 7bf08cd2
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment