Skip to content

Commit 3432536

Browse files
committed
test debugging output
1 parent 141119a commit 3432536

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/dev/openfga/sdk/api/client/HttpRequestAttempt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private CompletableFuture<ApiResponse<T>> processHttpResponse(
145145
if (retryNumber < configuration.getMaxRetries()) {
146146
// Parse Retry-After header if present
147147
Optional<Duration> retryAfterDelay =
148-
response.headers().firstValue("retry-after").flatMap(RetryAfterHeaderParser::parseRetryAfter);
148+
response.headers().firstValue("Retry-After").flatMap(RetryAfterHeaderParser::parseRetryAfter);
149149

150150
// Check if we should retry based on the new strategy
151151
if (RetryStrategy.shouldRetry(statusCode)) {

src/test/java/dev/openfga/sdk/api/client/HttpRequestAttemptRetryTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,8 @@ void shouldUseRetryAfterWhenLargerThanGlobalMinimumDelay() throws Exception {
552552
// Then
553553
// Should have respected the Retry-After header (2 seconds) over minimum delay (500ms)
554554
// Note: Using generous bounds due to timing variability in test environments
555+
System.out.println("Actual retry duration: " + totalTime.toMillis() + " ms");
556+
555557
assertThat(totalTime.toMillis())
556558
.isGreaterThan(1200); // Should be at least ~2 seconds (with larger CI tolerance)
557559
assertThat(totalTime.toMillis()).isLessThan(10000); // But not excessive

0 commit comments

Comments
 (0)