Skip to content

Commit

Permalink
fixed NPE in test due to log4j2 excpeting a stacktrace (#8487)
Browse files Browse the repository at this point in the history
  • Loading branch information
moderakh authored Feb 26, 2020
1 parent a541150 commit 43bd35a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ public void retriesExhausted() {
private CosmosClientException mockThrottlingException(long retriesAfter) {
CosmosClientException throttleException = mock(CosmosClientException.class);
doReturn(429).when(throttleException).getStatusCode();
doReturn(new StackTraceElement[0]).when(throttleException).getStackTrace();
doReturn(retriesAfter).when(throttleException).getRetryAfterInMilliseconds();
return throttleException;
}
Expand Down

0 comments on commit 43bd35a

Please sign in to comment.