Skip to content

Commit

Permalink
Revert "event: fix DispatcherImplTest::InitializeStats flake (#6619)"
Browse files Browse the repository at this point in the history
This reverts commit bad70bf.

Signed-off-by: Matt Klein <mklein@lyft.com>
  • Loading branch information
mattklein123 committed Apr 18, 2019
1 parent 4f105f5 commit 088ac4c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/common/event/dispatcher_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class DispatcherImplTest : public testing::Test {
dispatcher_thread_->join();
}

NiceMock<Stats::MockStore> scope_; // Used in InitializeStats, must outlive dispatcher_->exit().
Api::ApiPtr api_;
Thread::ThreadPtr dispatcher_thread_;
DispatcherPtr dispatcher_;
Expand All @@ -97,9 +96,11 @@ class DispatcherImplTest : public testing::Test {
};

TEST_F(DispatcherImplTest, InitializeStats) {
EXPECT_CALL(scope_, histogram("test.dispatcher.loop_duration_us"));
EXPECT_CALL(scope_, histogram("test.dispatcher.poll_delay_us"));
dispatcher_->initializeStats(scope_, "test.");
// NiceMock because deliverHistogramToSinks may or may not be called, depending on timing.
NiceMock<Stats::MockStore> scope;
EXPECT_CALL(scope, histogram("test.dispatcher.loop_duration_us"));
EXPECT_CALL(scope, histogram("test.dispatcher.poll_delay_us"));
dispatcher_->initializeStats(scope, "test.");
}

TEST_F(DispatcherImplTest, Post) {
Expand Down

0 comments on commit 088ac4c

Please sign in to comment.