@@ -306,37 +306,35 @@ class ParseUserCombineTests: XCTestCase { // swiftlint:disable:this type_body_le
306
306
if case let . failure( error) = result {
307
307
XCTFail ( error. localizedDescription)
308
308
}
309
- expectation1. fulfill ( )
310
-
311
- } , receiveValue: { _ in
312
- if let userFromKeychain = BaseParseUser . current {
313
- XCTFail ( " \( userFromKeychain) wasn't deleted from Keychain during logout " )
314
- }
315
- DispatchQueue . main. asyncAfter ( deadline: . now( ) + 1 ) {
316
- if let installationFromMemory: CurrentInstallationContainer < BaseParseInstallation >
317
- = try ? ParseStorage . shared. get ( valueFor: ParseStorage . Keys. currentInstallation) {
318
- if installationFromMemory. installationId == oldInstallationId
319
- || installationFromMemory. installationId == nil {
320
- XCTFail ( " \( installationFromMemory) wasn't deleted and recreated in memory during logout " )
321
- }
322
- } else {
323
- XCTFail ( " Should have a new installation " )
309
+ if let userFromKeychain = BaseParseUser . current {
310
+ XCTFail ( " \( userFromKeychain) wasn't deleted from Keychain during logout " )
324
311
}
312
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 1 ) {
313
+ if let installationFromMemory: CurrentInstallationContainer < BaseParseInstallation >
314
+ = try ? ParseStorage . shared. get ( valueFor: ParseStorage . Keys. currentInstallation) {
315
+ if installationFromMemory. installationId == oldInstallationId
316
+ || installationFromMemory. installationId == nil {
317
+ XCTFail ( " \( installationFromMemory) wasn't deleted and recreated in memory during logout " )
318
+ }
319
+ } else {
320
+ XCTFail ( " Should have a new installation " )
321
+ }
325
322
326
- #if !os(Linux) && !os(Android)
327
- if let installationFromKeychain: CurrentInstallationContainer < BaseParseInstallation >
328
- = try ? KeychainStore . shared. get ( valueFor: ParseStorage . Keys. currentInstallation) {
329
- if installationFromKeychain. installationId == oldInstallationId
330
- || installationFromKeychain. installationId == nil {
331
- XCTFail ( " \( installationFromKeychain) wasn't deleted & recreated in Keychain during logout " )
323
+ #if !os(Linux) && !os(Android)
324
+ if let installationFromKeychain: CurrentInstallationContainer < BaseParseInstallation >
325
+ = try ? KeychainStore . shared. get ( valueFor: ParseStorage . Keys. currentInstallation) {
326
+ if installationFromKeychain. installationId == oldInstallationId
327
+ || installationFromKeychain. installationId == nil {
328
+ XCTFail ( " \( installationFromKeychain) wasn't deleted & recreated in Keychain during logout " )
329
+ }
330
+ } else {
331
+ XCTFail ( " Should have a new installation " )
332
332
}
333
- } else {
334
- XCTFail ( " Should have a new installation " )
333
+ #endif
334
+ expectation1 . fulfill ( )
335
335
}
336
- #endif
337
- expectation1. fulfill ( )
338
- }
339
- } )
336
+
337
+ } , receiveValue: { _ in } )
340
338
publisher. store ( in: & subscriptions)
341
339
wait ( for: [ expectation1] , timeout: 20.0 )
342
340
}
0 commit comments