Skip to content

Commit b04dd35

Browse files
committed
Fix test
1 parent d8415f1 commit b04dd35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/java/org/stellar/sdk/requests/ResponseHandlerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static org.junit.Assert.assertEquals;
44

55
import java.io.IOException;
6+
import java.util.Optional;
67

78
import org.junit.Assert;
89
import org.junit.Test;
@@ -30,7 +31,7 @@ public void testTooManyRequests() throws IOException, InterruptedException {
3031
AccountsRequestBuilder.execute(okHttpClient, mockWebServer.url("/"));
3132
Assert.fail();
3233
} catch (TooManyRequestsException tmre) {
33-
assertEquals(10, tmre.getRetryAfter());
34+
assertEquals(Optional.of(10), tmre.getRetryAfter());
3435
} finally {
3536

3637
mockWebServer.shutdown();
@@ -55,7 +56,7 @@ public void testTooManyRequestsNoHeader() throws IOException, InterruptedExcepti
5556
AccountsRequestBuilder.execute(okHttpClient, mockWebServer.url("/"));
5657
Assert.fail();
5758
} catch (TooManyRequestsException tmre) {
58-
assertEquals(-1, tmre.getRetryAfter());
59+
assertEquals(Optional.empty(), tmre.getRetryAfter());
5960
} finally {
6061

6162
mockWebServer.shutdown();

0 commit comments

Comments
 (0)