Skip to content

Commit

Permalink
Adopt new Asnyc APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTim committed Oct 6, 2024
1 parent f13c1db commit 5f1a0d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Sources/FluentMySQLDriver/FluentMySQLDriver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ struct FluentMySQLDriver: DatabaseDriver {
func shutdown() {
try? self.pool.syncShutdownGracefully()
}

func shutdownAsync() async {
try? await self.pool.shutdownAsync()
}
}
6 changes: 3 additions & 3 deletions Tests/FluentMySQLDriverTests/FluentMySQLDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ final class FluentMySQLDriverTests: XCTestCase {
), as: .b)
}

override func tearDownWithError() throws {
self.dbs.shutdown()
override func tearDown() async throws {
await self.dbs.shutdownAsync()

try super.tearDownWithError()
try await super.tearDown()
}
}

Expand Down

0 comments on commit 5f1a0d3

Please sign in to comment.