File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
firebase-config/src/test/java/com/google/firebase/remoteconfig Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -1134,14 +1134,7 @@ public void realtime_stream_listen_and_retry_success() throws Exception {
1134
1134
1135
1135
@ Test
1136
1136
public void realtime_stream_listen_fail () throws Exception {
1137
- when (mockHttpURLConnection .getResponseCode ()).thenReturn (400 );
1138
- when (mockHttpURLConnection .getInputStream ())
1139
- .thenReturn (
1140
- new ByteArrayInputStream (
1141
- "{\\ r\\ n \\ \" latestTemplateVersionNumber\\ \" : 1\\ r\\ n}"
1142
- .getBytes (StandardCharsets .UTF_8 )));
1143
- when (mockFetchHandler .getTemplateVersionNumber ()).thenReturn (1L );
1144
- when (mockFetchHandler .fetch (0 )).thenReturn (Tasks .forResult (realtimeFetchedContainerResponse ));
1137
+ when (mockHttpURLConnection .getInputStream ()).thenThrow (IOException .class );
1145
1138
configAutoFetch .listenForNotifications ();
1146
1139
1147
1140
verify (mockListener ).onError (any (FirebaseRemoteConfigRealtimeUpdateFetchException .class ));
You can’t perform that action at this time.
0 commit comments