Revert negative-time CHECK in SimulatedEventLoop
This is a temporary fix to work around a bug in LogReader where the
startup handlers for a given node can get called before monotonic
time zero on that node.
Change-Id: I9719762342b5e764b4db9eb59f14dad72625278a
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/events/event_loop_param_test.cc b/aos/events/event_loop_param_test.cc
index 0eeecf8..e8ad5af 100644
--- a/aos/events/event_loop_param_test.cc
+++ b/aos/events/event_loop_param_test.cc
@@ -753,7 +753,8 @@
}
// Verify that setting up a timer before monotonic_clock::epoch() fails.
-TEST_P(AbstractEventLoopDeathTest, NegativeTimeTimer) {
+// TODO(james): Re-enable when LogReader handles startup correctly.
+TEST_P(AbstractEventLoopDeathTest, DISABLED_NegativeTimeTimer) {
auto loop = Make();
TimerHandler *time = loop->AddTimer([]() {});
EXPECT_DEATH(time->Setup(monotonic_clock::epoch() - std::chrono::seconds(1)),
diff --git a/aos/events/simulated_event_loop.cc b/aos/events/simulated_event_loop.cc
index 33893ad..e0ed7a0 100644
--- a/aos/events/simulated_event_loop.cc
+++ b/aos/events/simulated_event_loop.cc
@@ -1140,7 +1140,6 @@
void SimulatedTimerHandler::Setup(monotonic_clock::time_point base,
monotonic_clock::duration repeat_offset) {
- CHECK_GE(base, monotonic_clock::epoch());
// The allocations in here are due to infrastructure and don't count in the no
// mallocs in RT code.
ScopedNotRealtime nrt;