Skip to content

Commit 75484c4

Browse files
committed
docs: update migration test guidance
1 parent 9a1065a commit 75484c4

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Docs/MigrationGuide.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,17 @@ struct MyLogger: PersistentHistoryTrackingKitLoggerProtocol {
247247
4. Re-evaluate `allAuthors` and `batchAuthors`.
248248
5. Revisit cleanup expectations if you previously depended on forced cleanup.
249249
6. Use shared `UserDefaults` for App Group setups.
250-
7. Run tests serially, not in parallel.
250+
7. Run tests with the current parallel test baseline and keep Core Data concurrency assertions enabled.
251251

252252
## Testing Notes
253253

254-
This repository's full test suite is expected to run serially.
254+
This repository's full test suite now runs in parallel.
255255

256-
- Command line: `swift test --no-parallel`
256+
- Command line: `swift test --parallel`
257257
- Or use: `./test.sh`
258-
- In Xcode: disable parallel testing for the package
258+
- In Xcode: parallel execution is supported after the test infrastructure fixes
259+
- `TestModelBuilder.createContainer` is intentionally serialized because concurrent
260+
`NSPersistentContainer` initialization can crash inside Core Data during store loading
259261

260262
## Related Docs
261263

Docs/MigrationGuideCN.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,17 @@ struct MyLogger: PersistentHistoryTrackingKitLoggerProtocol {
239239
4. 重新审视 `allAuthors``batchAuthors`
240240
5. 如果之前依赖强制清理,重新设计清理策略。
241241
6. App Group 场景使用共享 `UserDefaults`
242-
7. 测试时使用串行执行,不要并行跑全量测试
242+
7. 按当前并行测试基线运行测试,并保持 Core Data 并发断言开启
243243

244244
## 测试说明
245245

246-
当前仓库的全量测试应视为串行测试
246+
当前仓库的全量测试已经切换为并行执行
247247

248-
- 命令行:`swift test --no-parallel`
248+
- 命令行:`swift test --parallel`
249249
- 或直接使用:`./test.sh`
250-
- Xcode 中请关闭 package 的并行测试
250+
- Xcode 中也支持并行测试
251+
- `TestModelBuilder.createContainer` 会刻意串行化,因为并发初始化 `NSPersistentContainer`
252+
并加载 store 时,Core Data 内部可能出现崩溃
251253

252254
## 相关文档
253255

0 commit comments

Comments
 (0)