Adar Dembo has posted comments on this change. Change subject: KUDU-1192 Periodically flush glog buffers from a thread ......................................................................
Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/6853/6/src/kudu/util/logging-test.cc File src/kudu/util/logging-test.cc: PS6, Line 180: // the AsyncLogger should have flushed at least once by the timer automatically : // so there should be no more messages in the buffer. This may not be the case if the system was under a lot of load at the time of SleepFor() (i.e. it's possible for the sleep to finish before the async logger thread was scheduled). Rather than hardcode a particular sleep value, wrap the assertions you want to make in an ASSERT_EVENTUALLY() block. Something like this: async.Write(...); async.Write(...); ASSERT_EVENTUALLY([&]() { ASSERT_EQ(base.message_count_, 2); ASSERT_GT(base.flush_count_, 0); }); async.Stop(); -- To view, visit http://gerrit.cloudera.org:8080/6853 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4c6d440e9259efcf222530f13137f7de5bf00fc Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: William Li <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: William Li <[email protected]> Gerrit-HasComments: Yes
