Linter cleanup

This commit is contained in:
Sean Corfield 2020-05-31 00:20:00 -07:00
parent 332cf4a3ed
commit db95d370d8
2 changed files with 6 additions and 12 deletions

View file

@ -1,17 +1,13 @@
;; copyright (c) 2019-2020 Sean Corfield, all rights reserved ;; copyright (c) 2019-2020 Sean Corfield, all rights reserved
(ns next.jdbc.middleware-test (ns next.jdbc.middleware-test
(:require [clojure.test :refer [deftest is testing use-fixtures]] (:require [clojure.test :refer [deftest is use-fixtures]]
[next.jdbc :as jdbc] [next.jdbc :as jdbc]
[next.jdbc.connection :as c]
[next.jdbc.middleware :as mw] [next.jdbc.middleware :as mw]
[next.jdbc.test-fixtures :refer [with-test-db db ds [next.jdbc.test-fixtures :refer [with-test-db db ds
default-options default-options]]
derby? postgres?]]
[next.jdbc.prepare :as prep]
[next.jdbc.result-set :as rs] [next.jdbc.result-set :as rs]
[next.jdbc.specs :as specs]) [next.jdbc.specs :as specs]))
(:import (java.sql ResultSet ResultSetMetaData)))
(set! *warn-on-reflection* true) (set! *warn-on-reflection* true)
@ -60,7 +56,7 @@
(deftest timing-test (deftest timing-test
(let [timing (atom {:calls 0 :total 0.0}) (let [timing (atom {:calls 0 :total 0.0})
start-fn (fn [sql-p opts] start-fn (fn [_ opts]
(swap! (:timing opts) update :calls inc) (swap! (:timing opts) update :calls inc)
(assoc opts :start (System/nanoTime))) (assoc opts :start (System/nanoTime)))
exec-fn (fn [_ opts] exec-fn (fn [_ opts]
@ -76,4 +72,4 @@
:sql-params-fn start-fn :sql-params-fn start-fn
:execute-fn exec-fn}) :execute-fn exec-fn})
sql-p) sql-p)
(println (db) (:calls @timing) "calls took" (long (:total @timing)) "nanoseconds"))) (println (:dbtype (db)) (:calls @timing) "calls took" (long (:total @timing)) "nanoseconds")))

View file

@ -4,10 +4,8 @@
"Multi-database testing fixtures." "Multi-database testing fixtures."
(:require [clojure.string :as str] (:require [clojure.string :as str]
[next.jdbc :as jdbc] [next.jdbc :as jdbc]
[next.jdbc.prepare :as prep]
[next.jdbc.sql :as sql]) [next.jdbc.sql :as sql])
(:import (com.opentable.db.postgres.embedded EmbeddedPostgres) (:import (com.opentable.db.postgres.embedded EmbeddedPostgres)))
(javax.sql DataSource)))
(set! *warn-on-reflection* true) (set! *warn-on-reflection* true)