diff --git a/firebase-config/src/test/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigTest.java b/firebase-config/src/test/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigTest.java index 076dafff6fe..a13e50c98e8 100644 --- a/firebase-config/src/test/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigTest.java +++ b/firebase-config/src/test/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigTest.java @@ -1533,8 +1533,8 @@ public void realtime_stream_listen_backgrounded_disconnects() throws Exception { .closeRealtimeHttpConnection(any(InputStream.class), any(InputStream.class)); when(mockHttpURLConnection.getResponseCode()).thenReturn(200); configRealtimeHttpClientSpy.beginRealtimeHttpStream(); - configRealtimeHttpClientSpy.setIsInBackground(true); flushScheduledTasks(); + configRealtimeHttpClientSpy.setIsInBackground(true); verify(mockHttpURLConnection, times(1)).disconnect(); }