Skip to content

Commit e3ffef4

Browse files
qdpham13danasilver
authored andcommitted
Update tests for NO_CHANGE bug.
1 parent 1a8704e commit e3ffef4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

firebase-config/src/test/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,8 +1162,9 @@ public void realtime_stream_listen_and_failsafe_disabled() throws Exception {
11621162
when(mockFetchHandler.fetch(0)).thenReturn(Tasks.forResult(realtimeFetchedContainerResponse));
11631163
configAutoFetch.listenForNotifications();
11641164

1165-
verify(mockRetryListener).onEvent();
1166-
verify(mockFetchHandler).fetch(0);
1165+
verify(mockListener, never())
1166+
.onError(any(FirebaseRemoteConfigRealtimeUpdateStreamException.class));
1167+
verify(mockFetchHandler).getTemplateVersionNumber();
11671168
}
11681169

11691170
@Test
@@ -1177,9 +1178,9 @@ public void realtimeFetch_defaultTemplateVersion_excludeFetchEtag() throws Excep
11771178
when(mockFetchHandler.getTemplateVersionNumber()).thenReturn(0L);
11781179
when(mockFetchHandler.fetchWithoutEtag(0L))
11791180
.thenReturn(Tasks.forResult(realtimeFetchedContainerResponse));
1180-
configAutoFetch.listenForNotifications();
1181+
configAutoFetch.fetchLatestConfig(0, 1);
11811182

1182-
verify(mockRetryListener).onEvent();
1183+
verify(mockListener).onEvent();
11831184
verify(mockFetchHandler).fetchWithoutEtag(0L);
11841185
}
11851186

0 commit comments

Comments
 (0)