Skip to content

Commit 01daefb

Browse files
committed
wip
1 parent 5581705 commit 01daefb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Tests/SQLiteDataTests/CloudKitTests/SchemaChangeTests.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@
106106
}
107107
}
108108

109+
/*
110+
* Old schema creates record and synchronizes to iCloud.
111+
* Schema is migrated to add a "NOT NULL" column.
112+
* New sync engine is launched.
113+
=> Sync starts without emitting an error.
114+
*/
109115
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)
110116
@Test func addColumn_OldRecordsSyncToNewSchema() async throws {
111117
let remindersList = RemindersList(id: 1, title: "Personal")
@@ -128,7 +134,8 @@
128134
.execute(db)
129135
}
130136

131-
let relaunchedSyncEngine = try await SyncEngine(
137+
// NB: Sync engine should start without emitting issue.
138+
_ = try await SyncEngine(
132139
container: syncEngine.container,
133140
userDatabase: syncEngine.userDatabase,
134141
tables: syncEngine.tables
@@ -139,7 +146,6 @@
139146
],
140147
privateTables: syncEngine.privateTables
141148
)
142-
defer { _ = relaunchedSyncEngine }
143149
}
144150

145151
@available(iOS 17, macOS 14, tvOS 17, watchOS 10, *)

0 commit comments

Comments
 (0)