Skip to content

Commit

Permalink
Fix flaky async_file_manager test (envoyproxy#21858)
Browse files Browse the repository at this point in the history
Signed-off-by: Raven Black <ravenblack@dropbox.com>
  • Loading branch information
ravenblackx authored Jun 24, 2022
1 parent 5e5ea14 commit 326b205
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ class AsyncFileHandleWithMockPosixTest : public testing::Test, public AsyncFileH
EXPECT_CALL(mock_posix_file_operations_, close(_))
.WillRepeatedly(Return(Api::SysCallIntResult{0, 0}));
}
void TearDown() override {
// manager_ must be torn down before mock_posix_file_operations_ to ensure that file
// operations are completed before the mock is destroyed.
manager_ = nullptr;
factory_ = nullptr;
}
StrictMock<Api::MockOsSysCalls> mock_posix_file_operations_;
};

Expand Down

0 comments on commit 326b205

Please sign in to comment.