diff --git a/Tests/DefaultsTests/Defaults+iCloudTests.swift b/Tests/DefaultsTests/Defaults+iCloudTests.swift index f0531df..cbaebca 100644 --- a/Tests/DefaultsTests/Defaults+iCloudTests.swift +++ b/Tests/DefaultsTests/Defaults+iCloudTests.swift @@ -77,6 +77,8 @@ final class DefaultsICloudTests: XCTestCase { func testICloudInitialize() async { let name = Defaults.Key("testICloudInitialize_name", default: "0", iCloud: true) let quality = Defaults.Key("testICloudInitialize_quality", default: 0.0, iCloud: true) + // Not sure why github action will not trigger a observation callback after initialization, cannot reproduce in local. + Defaults.iCloud.syncWithoutWaiting() await Defaults.iCloud.sync() XCTAssertEqual(mockStorage.object(forKey: name.name), "0") XCTAssertEqual(mockStorage.object(forKey: quality.name), 0.0) @@ -180,7 +182,7 @@ final class DefaultsICloudTests: XCTestCase { let quality = Defaults.Key("testSyncKeysFromLocal_quality", default: 0.0) let name_expected = ["1", "2", "3", "4", "5", "6", "7"] let quality_expected = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] - NSUbiquitousKeyValueStore.default.object(forKey: quality.name) + for index in 0..("testICloudInitializeFromDetached_name", default: "0", iCloud: true) + // Not sure why github action will not trigger a observation callback after initialization, cannot reproduce in local. + Defaults.iCloud.syncWithoutWaiting() await Defaults.iCloud.sync() XCTAssertEqual(mockStorage.object(forKey: name.name), "0") }