Skip to content

Commit e9834e8

Browse files
committed
docs(test): note the expected CoreData stderr in the fallback test
The deliberately-broken store path in fallsBackWhenDiskStoreFails makes CoreData print load-failure diagnostics to stderr before the Swift error is thrown. That output is below the `try?` layer and can't be swallowed, so CI log parsers surface it as red annotations on otherwise-green runs. The comment marks it as expected noise so a future reader or dashboard does not mistake it for a regression. Signed-off-by: Kevin Cui <bh@bugs.cc>
1 parent c56379f commit e9834e8

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Tests/LockIMEKitTests/LogStoreTests.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ struct LogStoreTests {
5151
// A regular file standing where the store directory should be: the
5252
// on-disk ModelContainer can't be created beneath it, so init must
5353
// take the in-memory fallback branch.
54+
//
55+
// EXPECTED NOISE: this deliberately-broken path makes CoreData/SwiftData
56+
// print diagnostics to stderr before the Swift error is thrown ("Store
57+
// failed to load", "errno 20 / Not a directory", NSCocoaError 258). That
58+
// stderr is below the `try?` layer and can't be swallowed; CI log parsers
59+
// surface it as red annotations. It is not a regression — the test
60+
// asserts the fallback succeeds.
5461
let badPath = FileManager.default.temporaryDirectory
5562
.appending(path: "lockime-badstore-\(UUID().uuidString)")
5663
try Data("not a directory".utf8).write(to: badPath)

0 commit comments

Comments
 (0)