apply review feedback and improve readability
This commit is contained in:
parent
24cc89442f
commit
7a9eb0b296
@ -128,8 +128,12 @@ class HttpClientAuthRetryLimitTest implements HttpServerAdapters {
|
|||||||
IOException exception = assertThrows(IOException.class, () -> client.send(
|
IOException exception = assertThrows(IOException.class, () -> client.send(
|
||||||
request, HttpResponse.BodyHandlers.discarding()));
|
request, HttpResponse.BodyHandlers.discarding()));
|
||||||
assertEquals("too many authentication attempts. Limit: " + RETRY_LIMIT, exception.getMessage());
|
assertEquals("too many authentication attempts. Limit: " + RETRY_LIMIT, exception.getMessage());
|
||||||
assertEquals(RETRY_LIMIT > 0 ? RETRY_LIMIT : 0,
|
int totalRequestCount = requestCount.get();
|
||||||
RETRY_LIMIT > 0 ? requestCount.get():requestCount.decrementAndGet());
|
if (RETRY_LIMIT > 0){
|
||||||
|
assertEquals(RETRY_LIMIT, totalRequestCount);
|
||||||
|
} else {
|
||||||
|
assertEquals(0, totalRequestCount - 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user