File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -208,8 +208,10 @@ class AmplifyPublisherTests: XCTestCase {
208
208
output. append ( value)
209
209
}
210
210
211
- await waitForExpectations ( timeout: 1 )
212
- XCTAssertEqual ( expected, output)
211
+ await waitForExpectations ( timeout: 3 )
212
+ for element in output {
213
+ XCTAssertTrue ( expected. contains ( element) )
214
+ }
213
215
sink. cancel ( )
214
216
}
215
217
@@ -232,8 +234,10 @@ class AmplifyPublisherTests: XCTestCase {
232
234
output. append ( value)
233
235
}
234
236
235
- await waitForExpectations ( timeout: 1 )
236
- XCTAssertEqual ( expected, output)
237
+ await waitForExpectations ( timeout: 3 )
238
+ for element in output {
239
+ XCTAssertTrue ( expected. contains ( element) )
240
+ }
237
241
sink. cancel ( )
238
242
}
239
243
@@ -332,6 +336,7 @@ class AmplifyPublisherTests: XCTestCase {
332
336
var current = 1
333
337
334
338
mutating func next( ) async throws -> Element ? {
339
+ try ? await Task . sleep ( nanoseconds: 500 )
335
340
defer { current *= 2 }
336
341
if current > 16 {
337
342
return nil
You can’t perform that action at this time.
0 commit comments