Improve listener_test by ensuring flushes are completed before assert.
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

mbarbon/rocksdb,norton/rocksdb,vmx/rocksdb,temicai/rocksdb,bbiao/rocksdb,Applied-Duality/rocksdb,vashstorm/rocksdb,fengshao0907/rocksdb,SunguckLee/RocksDB,rDSN-Projects/rocksdb.replicated,anagav/rocksdb,kaschaeffer/rocksdb,wenduo/rocksdb,makelivedotnet/rocksdb,luckywhu/rocksdb,wlqGit/rocksdb,luckywhu/rocksdb,ryneli/rocksdb,ylong/rocksdb,RyanTech/rocksdb,zhangpng/rocksdb,JohnPJenkins/rocksdb,Andymic/rocksdb,alihalabyah/rocksdb,NickCis/rocksdb,jalexanderqed/rocksdb,jalexanderqed/rocksdb,wlqGit/rocksdb,wskplho/rocksdb,JoeWoo/rocksdb,virtdb/rocksdb,flabby/rocksdb,JoeWoo/rocksdb,facebook/rocksdb,ryneli/rocksdb,JohnPJenkins/rocksdb,wat-ze-hex/rocksdb,NickCis/rocksdb,wskplho/rocksdb,vashstorm/rocksdb,JackLian/rocksdb,kaschaeffer/rocksdb,makelivedotnet/rocksdb,wlqGit/rocksdb,tsheasha/rocksdb,sorphi/rocksdb,wat-ze-hex/rocksdb,rDSN-Projects/rocksdb.replicated,SunguckLee/RocksDB,tsheasha/rocksdb,jalexanderqed/rocksdb,dkorolev/rocksdb,RyanTech/rocksdb,alihalabyah/rocksdb,tizzybec/rocksdb,caijieming-baidu/rocksdb,wenduo/rocksdb,alihalabyah/rocksdb,geraldoandradee/rocksdb,RyanTech/rocksdb,wlqGit/rocksdb,wenduo/rocksdb,sorphi/rocksdb,facebook/rocksdb,tsheasha/rocksdb,siddhartharay007/rocksdb,amyvmiwei/rocksdb,jalexanderqed/rocksdb,vashstorm/rocksdb,tizzybec/rocksdb,tizzybec/rocksdb,alihalabyah/rocksdb,flabby/rocksdb,vmx/rocksdb,caijieming-baidu/rocksdb,IMCG/RcoksDB,wskplho/rocksdb,NickCis/rocksdb,vashstorm/rocksdb,luckywhu/rocksdb,vmx/rocksdb,lgscofield/rocksdb,JackLian/rocksdb,wenduo/rocksdb,hobinyoon/rocksdb,sorphi/rocksdb,Andymic/rocksdb,bbiao/rocksdb,virtdb/rocksdb,sorphi/rocksdb,wlqGit/rocksdb,wat-ze-hex/rocksdb,zhangpng/rocksdb,mbarbon/rocksdb,Applied-Duality/rocksdb,wat-ze-hex/rocksdb,virtdb/rocksdb,temicai/rocksdb,JohnPJenkins/rocksdb,kaschaeffer/rocksdb,JoeWoo/rocksdb,vashstorm/rocksdb,NickCis/rocksdb,virtdb/rocksdb,biddyweb/rocksdb,dkorolev/rocksdb,wlqGit/rocksdb,zhangpng/rocksdb,OverlordQ/rocksdb,wat-ze-hex/rocksdb,anagav/rocksdb,norton/rocksdb,Andymic/rocksdb,Andymic/rocksdb,tsheasha/rocksdb,ylong/rocksdb,biddyweb/rocksdb,IMCG/RcoksDB,kaschaeffer/rocksdb,rDSN-Projects/rocksdb.replicated,OverlordQ/rocksdb,lgscofield/rocksdb,JackLian/rocksdb,siddhartharay007/rocksdb,kaschaeffer/rocksdb,RyanTech/rocksdb,zhangpng/rocksdb,temicai/rocksdb,skunkwerks/rocksdb,rDSN-Projects/rocksdb.replicated,fengshao0907/rocksdb,flabby/rocksdb,jalexanderqed/rocksdb,IMCG/RcoksDB,skunkwerks/rocksdb,SunguckLee/RocksDB,biddyweb/rocksdb,norton/rocksdb,lgscofield/rocksdb,siddhartharay007/rocksdb,caijieming-baidu/rocksdb,mbarbon/rocksdb,facebook/rocksdb,ylong/rocksdb,Vaisman/rocksdb,OverlordQ/rocksdb,RyanTech/rocksdb,OverlordQ/rocksdb,alihalabyah/rocksdb,norton/rocksdb,JackLian/rocksdb,norton/rocksdb,amyvmiwei/rocksdb,siddhartharay007/rocksdb,facebook/rocksdb,kaschaeffer/rocksdb,sorphi/rocksdb,bbiao/rocksdb,temicai/rocksdb,jalexanderqed/rocksdb,Andymic/rocksdb,anagav/rocksdb,wenduo/rocksdb,kaschaeffer/rocksdb,OverlordQ/rocksdb,ylong/rocksdb,tizzybec/rocksdb,SunguckLee/RocksDB,ryneli/rocksdb,sorphi/rocksdb,wat-ze-hex/rocksdb,Vaisman/rocksdb,amyvmiwei/rocksdb,siddhartharay007/rocksdb,IMCG/RcoksDB,IMCG/RcoksDB,biddyweb/rocksdb,JoeWoo/rocksdb,alihalabyah/rocksdb,Applied-Duality/rocksdb,hobinyoon/rocksdb,wskplho/rocksdb,amyvmiwei/rocksdb,skunkwerks/rocksdb,flabby/rocksdb,mbarbon/rocksdb,facebook/rocksdb,Vaisman/rocksdb,lgscofield/rocksdb,caijieming-baidu/rocksdb,vmx/rocksdb,biddyweb/rocksdb,flabby/rocksdb,ylong/rocksdb,NickCis/rocksdb,bbiao/rocksdb,wenduo/rocksdb,facebook/rocksdb,siddhartharay007/rocksdb,norton/rocksdb,facebook/rocksdb,IMCG/RcoksDB,JackLian/rocksdb,facebook/rocksdb,biddyweb/rocksdb,virtdb/rocksdb,NickCis/rocksdb,fengshao0907/rocksdb,Vaisman/rocksdb,temicai/rocksdb,flabby/rocksdb,ylong/rocksdb,amyvmiwei/rocksdb,mbarbon/rocksdb,makelivedotnet/rocksdb,makelivedotnet/rocksdb,virtdb/rocksdb,RyanTech/rocksdb,lgscofield/rocksdb,JoeWoo/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,fengshao0907/rocksdb,ylong/rocksdb,hobinyoon/rocksdb,amyvmiwei/rocksdb,biddyweb/rocksdb,NickCis/rocksdb,JohnPJenkins/rocksdb,anagav/rocksdb,bbiao/rocksdb,wskplho/rocksdb,vmx/rocksdb,hobinyoon/rocksdb,fengshao0907/rocksdb,Andymic/rocksdb,anagav/rocksdb,geraldoandradee/rocksdb,norton/rocksdb,tsheasha/rocksdb,alihalabyah/rocksdb,Applied-Duality/rocksdb,vashstorm/rocksdb,geraldoandradee/rocksdb,caijieming-baidu/rocksdb,zhangpng/rocksdb,SunguckLee/RocksDB,luckywhu/rocksdb,tsheasha/rocksdb,makelivedotnet/rocksdb,IMCG/RcoksDB,sorphi/rocksdb,dkorolev/rocksdb,Vaisman/rocksdb,SunguckLee/RocksDB,zhangpng/rocksdb,luckywhu/rocksdb,temicai/rocksdb,makelivedotnet/rocksdb,luckywhu/rocksdb,OverlordQ/rocksdb,JoeWoo/rocksdb,ryneli/rocksdb,hobinyoon/rocksdb,dkorolev/rocksdb,wat-ze-hex/rocksdb,vmx/rocksdb,Andymic/rocksdb,dkorolev/rocksdb,SunguckLee/RocksDB,Applied-Duality/rocksdb,JohnPJenkins/rocksdb,tizzybec/rocksdb,Applied-Duality/rocksdb,JohnPJenkins/rocksdb,JohnPJenkins/rocksdb,SunguckLee/RocksDB,mbarbon/rocksdb,OverlordQ/rocksdb,siddhartharay007/rocksdb,anagav/rocksdb,anagav/rocksdb,skunkwerks/rocksdb,rDSN-Projects/rocksdb.replicated,wlqGit/rocksdb,hobinyoon/rocksdb,bbiao/rocksdb,caijieming-baidu/rocksdb,tsheasha/rocksdb,skunkwerks/rocksdb,Vaisman/rocksdb,lgscofield/rocksdb,fengshao0907/rocksdb,Vaisman/rocksdb,wskplho/rocksdb,skunkwerks/rocksdb,geraldoandradee/rocksdb,JoeWoo/rocksdb,jalexanderqed/rocksdb,hobinyoon/rocksdb,rDSN-Projects/rocksdb.replicated,ryneli/rocksdb,vmx/rocksdb,wskplho/rocksdb,geraldoandradee/rocksdb,geraldoandradee/rocksdb,zhangpng/rocksdb,norton/rocksdb,Applied-Duality/rocksdb,bbiao/rocksdb,wat-ze-hex/rocksdb,caijieming-baidu/rocksdb,ryneli/rocksdb,vmx/rocksdb,fengshao0907/rocksdb,wenduo/rocksdb,ryneli/rocksdb,luckywhu/rocksdb,bbiao/rocksdb,Andymic/rocksdb,wenduo/rocksdb,dkorolev/rocksdb,amyvmiwei/rocksdb,JackLian/rocksdb,makelivedotnet/rocksdb,flabby/rocksdb,tizzybec/rocksdb,tsheasha/rocksdb,lgscofield/rocksdb,virtdb/rocksdb,tizzybec/rocksdb,mbarbon/rocksdb,hobinyoon/rocksdb,dkorolev/rocksdb,JackLian/rocksdb,RyanTech/rocksdb,temicai/rocksdb,skunkwerks/rocksdb,rDSN-Projects/rocksdb.replicated