chenBright commented on code in PR #3611:
URL: https://github.com/apache/brpc/pull/3611#discussion_r4313928971


##########
test/bvar_histogram_unittest.cpp:
##########
@@ -707,9 +707,10 @@ TEST_F(HistogramTest, window) {
 
     // Window values are produced by the global sampler thread. Wait until it
     // observes all writes instead of assuming a fixed sleep covers a sampling
-    // round, which is not guaranteed when the test host is busy.
+    // round, which is not guaranteed when the test host is busy. Allow up to
+    // 30 seconds at 100 ms per retry.
     bvar::Histogram::Value wv;
-    for (int i = 0; i < 50; ++i) {
+    for (int i = 0; i < 300; ++i) {
         wv = w.get_value();
         if (wv.num == 3) {
             break;

Review Comment:
   The full loop already calls `usleep(100 * 1000)` after each unsuccessful 
check at line 718. It allows 300 retries with a 100 ms sleep, while exiting 
immediately on success. The sleep is just outside the displayed diff hunk.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to