Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc committed Apr 28, 2023
1 parent d8415f1 commit b04dd35
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.util.Optional;

import org.junit.Assert;
import org.junit.Test;
Expand Down Expand Up @@ -30,7 +31,7 @@ public void testTooManyRequests() throws IOException, InterruptedException {
AccountsRequestBuilder.execute(okHttpClient, mockWebServer.url("/"));
Assert.fail();
} catch (TooManyRequestsException tmre) {
assertEquals(10, tmre.getRetryAfter());
assertEquals(Optional.of(10), tmre.getRetryAfter());
} finally {

mockWebServer.shutdown();
Expand All @@ -55,7 +56,7 @@ public void testTooManyRequestsNoHeader() throws IOException, InterruptedExcepti
AccountsRequestBuilder.execute(okHttpClient, mockWebServer.url("/"));
Assert.fail();
} catch (TooManyRequestsException tmre) {
assertEquals(-1, tmre.getRetryAfter());
assertEquals(Optional.empty(), tmre.getRetryAfter());
} finally {

mockWebServer.shutdown();
Expand Down

0 comments on commit b04dd35

Please sign in to comment.