Address #24 by setting warn on reflection in tests
This highlights the reflection on `.close` (in the connection tests).
This commit is contained in:
parent
792bf242d7
commit
fdfb0697ec
14 changed files with 28 additions and 0 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
from Clojure data."
|
from Clojure data."
|
||||||
(:require [clojure.string :as str]))
|
(:require [clojure.string :as str]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(defn ansi "ANSI \"quoting\"" [s] (str \" s \"))
|
(defn ansi "ANSI \"quoting\"" [s] (str \" s \"))
|
||||||
|
|
||||||
(defn mysql "MySQL `quoting`" [s] (str \` s \`))
|
(defn mysql "MySQL `quoting`" [s] (str \` s \`))
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
(:import (java.sql Connection PreparedStatement)
|
(:import (java.sql Connection PreparedStatement)
|
||||||
(javax.sql DataSource)))
|
(javax.sql DataSource)))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(s/def ::dbtype string?)
|
(s/def ::dbtype string?)
|
||||||
(s/def ::dbname string?)
|
(s/def ::dbname string?)
|
||||||
(s/def ::classname string?)
|
(s/def ::classname string?)
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,8 @@
|
||||||
(:require [clojure.string :as str]
|
(:require [clojure.string :as str]
|
||||||
[next.jdbc :refer [execute! execute-one!]]))
|
[next.jdbc :refer [execute! execute-one!]]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(defn- by-keys
|
(defn- by-keys
|
||||||
"Given a hash map of column names and values and a clause type
|
"Given a hash map of column names and values and a clause type
|
||||||
(`:set`, `:where`), return a vector of a SQL clause and its parameters.
|
(`:set`, `:where`), return a vector of a SQL clause and its parameters.
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
[next.jdbc.connection :as c]
|
[next.jdbc.connection :as c]
|
||||||
[next.jdbc.protocols :as p]))
|
[next.jdbc.protocols :as p]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(def ^:private db-name "clojure_test")
|
(def ^:private db-name "clojure_test")
|
||||||
|
|
||||||
(deftest test-aliases-and-defaults
|
(deftest test-aliases-and-defaults
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@
|
||||||
[next.jdbc.protocols :as p]
|
[next.jdbc.protocols :as p]
|
||||||
[next.jdbc.test-fixtures :refer [with-test-db ds]]))
|
[next.jdbc.test-fixtures :refer [with-test-db ds]]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(use-fixtures :once with-test-db)
|
(use-fixtures :once with-test-db)
|
||||||
|
|
||||||
(deftest test-map-row-builder
|
(deftest test-map-row-builder
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,5 @@
|
||||||
actually work they way they're supposed to!"
|
actually work they way they're supposed to!"
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.prepare :refer :all]))
|
[next.jdbc.prepare :refer :all]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,5 @@
|
||||||
at this level tho'..."
|
at this level tho'..."
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.protocols :refer :all]))
|
[next.jdbc.protocols :refer :all]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
[next.jdbc.quoted :refer [ansi mysql sql-server oracle postgres
|
[next.jdbc.quoted :refer [ansi mysql sql-server oracle postgres
|
||||||
schema]]))
|
schema]]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(deftest basic-quoting
|
(deftest basic-quoting
|
||||||
(are [quote-fn quoted] (= (quote-fn "x") quoted)
|
(are [quote-fn quoted] (= (quote-fn "x") quoted)
|
||||||
ansi "\"x\""
|
ansi "\"x\""
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@
|
||||||
[next.jdbc.test-fixtures :refer [with-test-db ds]])
|
[next.jdbc.test-fixtures :refer [with-test-db ds]])
|
||||||
(:import (java.sql ResultSet ResultSetMetaData)))
|
(:import (java.sql ResultSet ResultSetMetaData)))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(use-fixtures :once with-test-db)
|
(use-fixtures :once with-test-db)
|
||||||
|
|
||||||
(deftest test-datafy-nav
|
(deftest test-datafy-nav
|
||||||
|
|
|
||||||
|
|
@ -7,3 +7,5 @@
|
||||||
next.jdbc and next.jdbc.sql namespaces."
|
next.jdbc and next.jdbc.sql namespaces."
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.specs :refer :all]))
|
[next.jdbc.specs :refer :all]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
[next.jdbc.test-fixtures
|
[next.jdbc.test-fixtures
|
||||||
:refer [with-test-db ds derby? sqlite?]]))
|
:refer [with-test-db ds derby? sqlite?]]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(use-fixtures :once with-test-db)
|
(use-fixtures :once with-test-db)
|
||||||
|
|
||||||
(specs/instrument)
|
(specs/instrument)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
(:require [next.jdbc :as jdbc]
|
(:require [next.jdbc :as jdbc]
|
||||||
[next.jdbc.sql :as sql]))
|
[next.jdbc.sql :as sql]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(def ^:private test-derby {:dbtype "derby" :dbname "clojure_test_derby" :create true})
|
(def ^:private test-derby {:dbtype "derby" :dbname "clojure_test_derby" :create true})
|
||||||
|
|
||||||
(def ^:private test-h2-mem {:dbtype "h2:mem" :dbname "clojure_test_h2_mem"})
|
(def ^:private test-h2-mem {:dbtype "h2:mem" :dbname "clojure_test_h2_mem"})
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,5 @@
|
||||||
"Stub test namespace for transaction handling."
|
"Stub test namespace for transaction handling."
|
||||||
(:require [clojure.test :refer [deftest is testing]]
|
(:require [clojure.test :refer [deftest is testing]]
|
||||||
[next.jdbc.transaction :refer :all]))
|
[next.jdbc.transaction :refer :all]))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
[next.jdbc.specs :as specs])
|
[next.jdbc.specs :as specs])
|
||||||
(:import (java.sql ResultSet ResultSetMetaData)))
|
(:import (java.sql ResultSet ResultSetMetaData)))
|
||||||
|
|
||||||
|
(set! *warn-on-reflection* true)
|
||||||
|
|
||||||
(use-fixtures :once with-test-db)
|
(use-fixtures :once with-test-db)
|
||||||
|
|
||||||
(specs/instrument)
|
(specs/instrument)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue