Skip to content

Commit a7139d5

Browse files
erin2722MongoDB Bot
authored andcommitted
SERVER-106636 Use longer timeout when waiting for all threads to queue in ConcurrentTokenAcquisitionWithQueueing test (#37693)
GitOrigin-RevId: 3f8121aff02c4ecebc4bf9562665490e4b05de76
1 parent 9b9f76c commit a7139d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mongo/db/admission/rate_limiter_util_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ TEST_F(RateLimiterWithMockClockTest, ConcurrentTokenAcquisitionWithQueueing) {
432432

433433
// Make sure we've enqueued all the remaining waiters so that we don't race with advancing
434434
// the mock clock.
435-
int64_t maxBackoffMillis{5000};
436-
int64_t backoffTimeMillis{2};
437-
while (rateLimiter.queued() != numThreads - maxTokens &&
438-
backoffTimeMillis < maxBackoffMillis) {
435+
int64_t numRetries = 0;
436+
const int64_t maxRetries = 5;
437+
int64_t backoffTimeMillis{5};
438+
while (rateLimiter.queued() != numThreads - maxTokens && numRetries++ < maxRetries) {
439439
sleepmillis(backoffTimeMillis);
440-
backoffTimeMillis *= backoffTimeMillis;
440+
backoffTimeMillis *= 5;
441441
}
442442

443443
// Until we start moving the mock clock forward, no other requests will be fulfilled and all

0 commit comments

Comments
 (0)