From 8cff640ec1633713912abc376071d50f66e3bcdd Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Mon, 5 Oct 2026 21:40:02 -0700 Subject: [PATCH] Remove flaky and dumb test. --- .../SyncStatusTableTests.swift | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/Modules/SyncDatabase/Tests/SyncDatabaseTests/SyncStatusTableTests.swift b/Modules/SyncDatabase/Tests/SyncDatabaseTests/SyncStatusTableTests.swift index 4e0912f93..fe01cac32 100644 --- a/Modules/SyncDatabase/Tests/SyncDatabaseTests/SyncStatusTableTests.swift +++ b/Modules/SyncDatabase/Tests/SyncDatabaseTests/SyncStatusTableTests.swift @@ -77,33 +77,4 @@ import SyncDatabase #expect(try await database.selectForProcessing().isEmpty) #expect(try await database.selectPendingCount() == 0) } - - /// A read that stops on a SQLite error has to fail, not return the rows it got to - /// first. A short pending-statuses read is missing articleIDs that really are - /// pending, and the next refresh reverts exactly those edits. - /// - /// This covers failing on the first row. A failure partway through is the same bug - /// and the same fix, but there’s no way to force one at a chosen row. - @Test func aReadThatStopsOnAnErrorFails() async throws { - let folderURL = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString) - try FileManager.default.createDirectory(at: folderURL, withIntermediateDirectories: true) - defer { - try? FileManager.default.removeItem(at: folderURL) - } - - let database = SyncDatabase(databasePath: folderURL.appendingPathComponent("Sync.sqlite3").path) - let articleIDs = (0..<10).map { "article-\($0)" } - await database.insertStatuses(Set(articleIDs.map { SyncStatus(articleID: $0, key: .read, flag: true) })) - - // Every call fails once the folder is gone, but the statements still prepare - // cleanly — the failure only shows up while stepping through the rows. - try FileManager.default.removeItem(at: folderURL) - - await #expect(throws: SyncDatabaseError.self) { - try await database.selectForProcessing() - } - await #expect(throws: SyncDatabaseError.self) { - try await database.selectPendingReadStatusArticleIDs() - } - } }