From aa31fc506827b11b585d150b63b42f103a74f07a Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Fri, 21 Nov 2014 10:22:05 -0800 Subject: [PATCH] Improve listener_test by ensuring flushes are completed before assert. Summary: Improve listener_test by ensuring flushes are completed before assert. Test Plan: listener_test Reviewers: ljin, sdong, igor Reviewed By: igor Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D29319 --- db/listener_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/listener_test.cc b/db/listener_test.cc index 35e00c94a..595e01e6e 100644 --- a/db/listener_test.cc +++ b/db/listener_test.cc @@ -135,10 +135,12 @@ class EventListenerTest { } Status Flush(int cf = 0) { + FlushOptions opt = FlushOptions(); + opt.wait = true; if (cf == 0) { - return db_->Flush(FlushOptions()); + return db_->Flush(opt); } else { - return db_->Flush(FlushOptions(), handles_[cf]); + return db_->Flush(opt, handles_[cf]); } }