@@ -33,7 +33,7 @@ class MockListenerRegistration: ConfigUpdateListenerRegistration, @unchecked Sen
33
33
/// A mock for the RCNConfigRealtime component that allows tests to control the config update
34
34
/// listener.
35
35
class MockRealtime : RCNConfigRealtime , @unchecked Sendable {
36
- /// The listener closure captured from the `updates ` async stream.
36
+ /// The listener closure captured from the `configUpdates ` async stream.
37
37
var listener : ( ( RemoteConfigUpdate ? , Error ? ) -> Void ) ?
38
38
let mockRegistration = MockListenerRegistration ( )
39
39
var listenerAttachedExpectation : XCTestExpectation ?
@@ -62,7 +62,7 @@ class MockRealtime: RCNConfigRealtime, @unchecked Sendable {
62
62
}
63
63
}
64
64
65
- // MARK: - AsyncStreamTests2
65
+ // MARK: - AsyncStreamTests
66
66
67
67
@available ( iOS 13 , tvOS 13 , macOS 10 . 15 , macCatalyst 13 , watchOS 7 , * )
68
68
class AsyncStreamTests : XCTestCase {
@@ -107,7 +107,7 @@ class AsyncStreamTests: XCTestCase {
107
107
mockRealtime. listenerAttachedExpectation = listenerAttachedExpectation
108
108
109
109
let listeningTask = Task {
110
- for try await update in config. updates {
110
+ for try await update in config. configUpdates {
111
111
XCTAssertEqual ( update. updatedKeys, Set ( keysToUpdate) )
112
112
expectation. fulfill ( )
113
113
break // End the loop after receiving the expected update.
@@ -132,7 +132,7 @@ class AsyncStreamTests: XCTestCase {
132
132
133
133
let listeningTask = Task {
134
134
do {
135
- for try await _ in config. updates {
135
+ for try await _ in config. configUpdates {
136
136
XCTFail ( " Stream should not have yielded any updates. " )
137
137
}
138
138
} catch {
@@ -155,7 +155,7 @@ class AsyncStreamTests: XCTestCase {
155
155
mockRealtime. listenerAttachedExpectation = listenerAttachedExpectation
156
156
157
157
let listeningTask = Task {
158
- for try await _ in config. updates {
158
+ for try await _ in config. configUpdates {
159
159
// We will cancel the task, so it should not reach here.
160
160
}
161
161
}
@@ -185,7 +185,7 @@ class AsyncStreamTests: XCTestCase {
185
185
let listeningTask = Task {
186
186
var updateCount = 0
187
187
do {
188
- for try await _ in config. updates {
188
+ for try await _ in config. configUpdates {
189
189
updateCount += 1
190
190
}
191
191
// The loop finished without throwing, which is the success condition.
@@ -217,7 +217,7 @@ class AsyncStreamTests: XCTestCase {
217
217
mockRealtime. listenerAttachedExpectation = listenerAttachedExpectation
218
218
219
219
let listeningTask = Task {
220
- for try await update in config. updates {
220
+ for try await update in config. configUpdates {
221
221
receivedUpdates. append ( update. updatedKeys)
222
222
expectation. fulfill ( )
223
223
if receivedUpdates. count == updatesToSend. count {
0 commit comments