Skip to content

Commit

Permalink
add uuid model tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Jun 7, 2019
1 parent ecb582c commit 5959f23
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Tests/FluentPostgresDriverTests/FluentPostgresDriverTests.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Logging
import FluentBenchmark
import FluentPostgresDriver
import XCTest
Expand Down Expand Up @@ -107,11 +108,16 @@ final class FluentPostgresDriverTests: XCTestCase {
try self.benchmarker.testSort()
}

func testUUIDModel() throws {
try self.benchmarker.testUUIDModel()
}

var benchmarker: FluentBenchmarker!
var connectionPool: ConnectionPool<PostgresConnectionSource>!
var eventLoopGroup: EventLoopGroup!

override func setUp() {
XCTAssert(isLoggingConfigured)
let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let eventLoop = eventLoopGroup.next()
let hostname: String
Expand Down Expand Up @@ -140,3 +146,12 @@ final class FluentPostgresDriverTests: XCTestCase {
try! self.eventLoopGroup.syncShutdownGracefully()
}
}

let isLoggingConfigured: Bool = {
LoggingSystem.bootstrap { label in
var handler = StreamLogHandler.standardOutput(label: label)
handler.logLevel = .debug
return handler
}
return true
}()

0 comments on commit 5959f23

Please sign in to comment.