File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
FirebaseRemoteConfig/Tests/Swift/SwiftAPI Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,31 @@ class APITests: APITestBase {
179179 registration. remove ( )
180180 }
181181
182+ func testRealtimeRemoteConfigRealConsoleAsync( ) async {
183+ guard APITests . useFakeConfig == false else { return }
184+
185+ let expectation = expectation ( description: #function)
186+
187+ let task = Task {
188+ for await updateResult in config. updateStream {
189+ switch updateResult {
190+ case let . success( update) :
191+ XCTAssertNotNil ( update)
192+ XCTAssertNotNil ( update. updatedKeys. contains ( Constants . jedi) )
193+ case let . failure( error) :
194+ XCTFail ( " Expected a successful update result, but received an error: \( error) " )
195+ }
196+
197+ expectation. fulfill ( )
198+ }
199+ }
200+
201+ console. updateRemoteConfigValue ( Constants . yoda, forKey: Constants . jedi)
202+
203+ await fulfillment ( of: [ expectation] , timeout: 5.0 )
204+ task. cancel ( )
205+ }
206+
182207 // MARK: - RemoteConfigConsole Tests
183208
184209 func testFetchConfigThenUpdateConsoleThenFetchAgain( ) {
You can’t perform that action at this time.
0 commit comments