mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Skip vacuuming if running unit tests. Prevents a zillion little prefs being set in user defaults.
This commit is contained in:
1 parent
2e92347559
commit
0591b5eed4
3 files changed
+12
-3
No files matched your search
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import RSCore
|
||||
import RSDatabase
|
||||
import RSDatabaseObjC
|
||||
|
||||
@@ -17,7 +18,9 @@ public actor SyncDatabase {
|
||||
public init(databasePath: String) {
|
||||
let database = FMDatabase.openAndSetUpDatabase(path: databasePath)
|
||||
database.runCreateStatements(Self.tableCreationStatements)
|
||||
database.vacuumIfNeeded(daysBetweenVacuums: 11, filepath: databasePath)
|
||||
if !Platform.isRunningUnitTests {
|
||||
database.vacuumIfNeeded(daysBetweenVacuums: 11, filepath: databasePath)
|
||||
}
|
||||
|
||||
self.database = database
|
||||
self.databasePath = databasePath
|
||||
|
||||
Reference in new issue
Block a user