Skip to content

Commit 9eebf51

Browse files
nhachichastIncMale
andauthored
Update driver-core/src/test/unit/com/mongodb/internal/time/ExponentialBackoffTest.java
Co-authored-by: Valentin Kovalenko <valentin.male.kovalenko@gmail.com>
1 parent 9153831 commit 9eebf51

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

driver-core/src/test/unit/com/mongodb/internal/time/ExponentialBackoffTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void testCalculateTransactionBackoffMs() {
4444
@Test
4545
void testCalculateTransactionBackoffMsRespectsMaximum() {
4646
// Even at high attempt numbers, backoff should never exceed ExponentialBackoff.TRANSACTION_MAX_MS
47-
for (int attemptNumber = 1; attemptNumber < 26; attemptNumber++) {
47+
for (int attemptNumber = 1; attemptNumber < EXPECTED_BACKOFFS_MAX_VALUES.length * 2; attemptNumber++) {
4848
long backoff = ExponentialBackoff.calculateTransactionBackoffMs(attemptNumber);
4949
assertTrue(backoff >= 0 && backoff <= ExponentialBackoff.TRANSACTION_MAX_MS,
5050
String.format("Attempt %d: backoff should be capped at %f ms, got: %d ms",

0 commit comments

Comments
 (0)