Skip to content

Commit 1881f28

Browse files
committed
Remove test debug
1 parent 0c37ba4 commit 1881f28

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/test/java/com/google/firebase/internal/ApacheHttp2TransportIT.java

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class ApacheHttp2TransportIT {
6060

6161
// Sets a 5 second delay before response
6262
private static final String DELAY_URL = "https://nghttp2.org/httpbin/delay/5";
63-
private static final String NO_CONNECT_URL = "https://google.com:81";
63+
private static final String NO_CONNECT_URL = "http://google.com:81";
6464
private static final String GET_URL = "https://nghttp2.org/httpbin/get";
6565
private static final String POST_URL = "https://nghttp2.org/httpbin/post";
6666

@@ -124,19 +124,15 @@ public void testConnectTimeoutPost() throws IOException {
124124
public void testConnectTimeoutAuthorizedGet() throws FirebaseException {
125125
app = FirebaseApp.initializeApp(FirebaseOptions.builder()
126126
.setCredentials(MOCK_CREDENTIALS)
127-
// .setConnectTimeout(100)
127+
.setConnectTimeout(100)
128128
.build(), "test-app");
129129
ErrorHandlingHttpClient<FirebaseException> httpClient = getHttpClient(true, app);
130-
HttpRequestInfo request = HttpRequestInfo.buildGetRequest(GET_URL);
130+
HttpRequestInfo request = HttpRequestInfo.buildGetRequest(NO_CONNECT_URL);
131131

132132
try {
133133
httpClient.send(request);
134134
fail("No exception thrown for HTTP error response");
135135
} catch (FirebaseException e) {
136-
System.out.println(e.getCause());
137-
System.out.println(e.getCause().getMessage());
138-
System.out.println(e.getCause().getCause());
139-
System.out.println(e.getCause().getCause().getMessage());
140136
assertEquals(ErrorCode.UNKNOWN, e.getErrorCode());
141137
assertEquals("IO error: Connection Timeout", e.getMessage());
142138
assertNull(e.getHttpResponse());
@@ -150,18 +146,14 @@ public void testConnectTimeoutAuthorizedPost() throws FirebaseException {
150146
.setConnectTimeout(100)
151147
.build(), "test-app");
152148
ErrorHandlingHttpClient<FirebaseException> httpClient = getHttpClient(true, app);
153-
HttpRequestInfo request = HttpRequestInfo.buildJsonPostRequest(POST_URL, payload);
149+
HttpRequestInfo request = HttpRequestInfo.buildJsonPostRequest(NO_CONNECT_URL, payload);
154150

155151
try {
156152
httpClient.send(request);
157153
fail("No exception thrown for HTTP error response");
158154
} catch (FirebaseException e) {
159-
System.out.println(e.getCause());
160-
System.out.println(e.getCause().getMessage());
161-
System.out.println(e.getCause().getCause());
162-
System.out.println(e.getCause().getCause().getMessage());
163155
assertEquals(ErrorCode.UNKNOWN, e.getErrorCode());
164-
assertEquals("IO error: Exception in request", e.getMessage());
156+
assertEquals("IO error: Connection Timeout", e.getMessage());
165157
assertNull(e.getHttpResponse());
166158
}
167159
}

0 commit comments

Comments
 (0)