@@ -49,16 +49,6 @@ final class AuthenticatorTests: XCTestCase {
49
49
throw AuthenticatorTestsError . disabled
50
50
}
51
51
52
- private func compatFulfillment( of expectations: [ XCTestExpectation ] , timeout: TimeInterval , enforceOrder: Bool ) async {
53
- #if compiler(>=5.8)
54
- await fulfillment ( of: expectations, timeout: timeout, enforceOrder: enforceOrder)
55
- #else
56
- await Task {
57
- wait ( for: expectations, timeout: timeout, enforceOrder: enforceOrder)
58
- } . value
59
- #endif
60
- }
61
-
62
52
@MainActor
63
53
func testInitialLogin( ) async throws {
64
54
let authedLoadExp = expectation ( description: " load url " )
@@ -115,7 +105,7 @@ final class AuthenticatorTests: XCTestCase {
115
105
116
106
let ( _, _) = try await auth. response ( for: URLRequest ( url: URL ( string: " https://example.com " ) !) )
117
107
118
- await compatFulfillment ( of: [ retrieveTokenExp, userAuthExp, storeTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
108
+ await fulfillment ( of: [ retrieveTokenExp, userAuthExp, storeTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
119
109
}
120
110
121
111
@MainActor
@@ -151,7 +141,7 @@ final class AuthenticatorTests: XCTestCase {
151
141
152
142
let ( _, _) = try await auth. response ( for: URLRequest ( url: URL ( string: " https://example.com " ) !) )
153
143
154
- await compatFulfillment ( of: [ retrieveTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
144
+ await fulfillment ( of: [ retrieveTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
155
145
}
156
146
157
147
@MainActor
@@ -203,7 +193,7 @@ final class AuthenticatorTests: XCTestCase {
203
193
204
194
let ( _, _) = try await auth. response ( for: URLRequest ( url: URL ( string: " https://example.com " ) !) )
205
195
206
- await compatFulfillment ( of: [ retrieveTokenExp, refreshExp, storeTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
196
+ await fulfillment ( of: [ retrieveTokenExp, refreshExp, storeTokenExp, authedLoadExp] , timeout: 1.0 , enforceOrder: true )
207
197
}
208
198
209
199
@MainActor
@@ -258,7 +248,7 @@ final class AuthenticatorTests: XCTestCase {
258
248
259
249
let ( _, _) = try await auth. response ( for: URLRequest ( url: URL ( string: " https://example.com " ) !) )
260
250
261
- await compatFulfillment ( of: [ userAuthExp, loadExp] , timeout: 1.0 , enforceOrder: true )
251
+ await fulfillment ( of: [ userAuthExp, loadExp] , timeout: 1.0 , enforceOrder: true )
262
252
}
263
253
264
254
@MainActor
@@ -319,7 +309,7 @@ final class AuthenticatorTests: XCTestCase {
319
309
320
310
let ( _, _) = try await auth. response ( for: URLRequest ( url: URL ( string: " https://example.com " ) !) )
321
311
322
- await compatFulfillment ( of: [ userAuthExp, loadExp] , timeout: 1.0 , enforceOrder: true )
312
+ await fulfillment ( of: [ userAuthExp, loadExp] , timeout: 1.0 , enforceOrder: true )
323
313
}
324
314
325
315
// Test AuthenticationResultHandler with a failed UserAuthenticator
@@ -374,7 +364,7 @@ final class AuthenticatorTests: XCTestCase {
374
364
throw error
375
365
}
376
366
377
- await compatFulfillment ( of: [ failureAuth] , timeout: 1.0 , enforceOrder: true )
367
+ await fulfillment ( of: [ failureAuth] , timeout: 1.0 , enforceOrder: true )
378
368
}
379
369
380
370
@MainActor
0 commit comments