fix flaky time handling and other issues in EventBaseTest.IdleTime
Summary: Update EventBaseTest.IdleTime() to drive the loop once before starting the bulk of the test logic. This triggers the initial NotificationQueue callbacks which can otherwise slow down the test slightly and make it more prone to failing due to not accounting for the time required for these callbacks. Also replace `ASSERT_*()` checks inside a lambda with `EXPECT_*()`. The googletest `ASSERT_*()` macros only work directly inside the main test function, as they `return` from the current function. When used inside the lambda these skip the remainder of the lambda but continue running the remainder of the test checks, which causes incorrect failures. Reviewed By: yfeldblum Differential Revision: D6843335 fbshipit-source-id: 879901edb6e5a5a84736705fb2d1cb8d2e0cc252
Showing
Please register or sign in to comment