Skip to content

Commit

Permalink
fix: prevent illegal negative timeout values into thread sleep() meth…
Browse files Browse the repository at this point in the history
…od while retrying exceptions in unit tests. (#2268)

* fix: prevent illegal negative timeout values into thread sleep() method while retrying exceptions in unit tests.

* For details on issue see - #2206
  • Loading branch information
arpan14 committed Feb 9, 2023
1 parent fa8edb3 commit ce66098
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -251,7 +251,10 @@ public void testTransactionManager() throws InterruptedException {
break;
}
} catch (AbortedException e) {
Thread.sleep(e.getRetryDelayInMillis());
long retryDelayInMillis = e.getRetryDelayInMillis();
if (retryDelayInMillis > 0) {
Thread.sleep(retryDelayInMillis);
}
txn = manager.resetForRetry();
}
}
Expand Down

0 comments on commit ce66098

Please sign in to comment.