File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/test/java/com/google/firebase/internal Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,12 @@ public void testReadTimeoutAuthorizedPost() throws FirebaseException {
198198
199199 @ Test (timeout = 10_000L )
200200 public void testWriteTimeoutAuthorizedGet () throws FirebaseException {
201+ // Use a fresh transport so that writeTimeout triggers while waiting for the transport to
202+ // be ready to receive data.
201203 app = FirebaseApp .initializeApp (FirebaseOptions .builder ()
202204 .setCredentials (MOCK_CREDENTIALS )
203- .setWriteTimeout (1 )
205+ .setWriteTimeout (100 )
206+ .setHttpTransport (new ApacheHttp2Transport ())
204207 .build (), "test-app" );
205208 ErrorHandlingHttpClient <FirebaseException > httpClient = getHttpClient (true , app );
206209 HttpRequestInfo request = HttpRequestInfo .buildGetRequest (GET_URL );
@@ -217,9 +220,12 @@ public void testWriteTimeoutAuthorizedGet() throws FirebaseException {
217220
218221 @ Test (timeout = 10_000L )
219222 public void testWriteTimeoutAuthorizedPost () throws FirebaseException {
223+ // Use a fresh transport so that writeTimeout triggers while waiting for the transport to
224+ // be ready to receive data.
220225 app = FirebaseApp .initializeApp (FirebaseOptions .builder ()
221226 .setCredentials (MOCK_CREDENTIALS )
222- .setWriteTimeout (1 )
227+ .setWriteTimeout (100 )
228+ .setHttpTransport (new ApacheHttp2Transport ())
223229 .build (), "test-app" );
224230 ErrorHandlingHttpClient <FirebaseException > httpClient = getHttpClient (true , app );
225231 HttpRequestInfo request = HttpRequestInfo .buildJsonPostRequest (POST_URL , payload );
You can’t perform that action at this time.
0 commit comments