diff --git a/Package.swift b/Package.swift index 5a21b435..1cc12715 100644 --- a/Package.swift +++ b/Package.swift @@ -16,9 +16,9 @@ let package = Package( .library(name: "XCTFluent", targets: ["XCTFluent"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.55.0"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.5.2"), - .package(url: "https://github.com/vapor/sql-kit.git", from: "3.28.0"), + .package(url: "https://github.com/apple/swift-nio.git", from: "2.62.0"), + .package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"), + .package(url: "https://github.com/vapor/sql-kit.git", from: "3.29.2"), .package(url: "https://github.com/vapor/async-kit.git", from: "1.17.0"), ], targets: [ diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 9cf39845..dcb6db3b 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -16,9 +16,9 @@ let package = Package( .library(name: "XCTFluent", targets: ["XCTFluent"]), ], dependencies: [ - .package(url: "https://github.com/apple/swift-nio.git", from: "2.55.0"), - .package(url: "https://github.com/apple/swift-log.git", from: "1.5.2"), - .package(url: "https://github.com/vapor/sql-kit.git", from: "3.28.0"), + .package(url: "https://github.com/apple/swift-nio.git", from: "2.62.0"), + .package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"), + .package(url: "https://github.com/vapor/sql-kit.git", from: "3.29.2"), .package(url: "https://github.com/vapor/async-kit.git", from: "1.17.0"), ], targets: [ diff --git a/Sources/FluentBenchmark/Tests/ModelTests.swift b/Sources/FluentBenchmark/Tests/ModelTests.swift index 611099ac..1703b760 100644 --- a/Sources/FluentBenchmark/Tests/ModelTests.swift +++ b/Sources/FluentBenchmark/Tests/ModelTests.swift @@ -207,16 +207,21 @@ extension FluentBenchmarker { } } + try (self.database as? any SQLDatabase)?.drop(table: Enclosure.schema).ifExists().run().wait() try Enclosure.Migration().prepare(on: self.database).wait() - let enclosure = Enclosure() - enclosure.primary = .init() - enclosure.primary.something = "" - enclosure.primary.another = 0 - enclosure.additional = [] - try enclosure.save(on: self.database).wait() - - try! Enclosure.Migration().revert(on: self.database).wait() + do { + let enclosure = Enclosure() + enclosure.primary = .init() + enclosure.primary.something = "" + enclosure.primary.another = 0 + enclosure.additional = [] + try enclosure.save(on: self.database).wait() + } catch { + try? Enclosure.Migration().revert(on: self.database).wait() + throw error + } + try Enclosure.Migration().revert(on: self.database).wait() } } }