Skip to content

Commit

Permalink
Fix testConnectTimeoutGet test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanedey committed Sep 17, 2024
1 parent ceac56c commit 18365a7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ public void testUnauthorizedPostRequest() throws FirebaseException {

@Test(timeout = 10_000L)
public void testConnectTimeoutGet() throws IOException {
HttpTransport transport = new ApacheHttp2Transport();
ApacheHttp2Transport transport = new ApacheHttp2Transport();
ApacheHttp2Request request = transport.buildRequest("GET", "https://localhost:" + port);
request.setTimeout(100, 0);
try {
transport.createRequestFactory().buildGetRequest(new GenericUrl("https://localhost:" + port))
.setConnectTimeout(100).execute();
request.execute();
fail("No exception thrown for HTTP error response");
} catch (IOException e) {
System.out.println(e.getCause());
Expand Down

0 comments on commit 18365a7

Please sign in to comment.