diff --git a/.github/workflows/test-and-snapshot.yml b/.github/workflows/test-and-snapshot.yml index 2724263..cbe0033 100644 --- a/.github/workflows/test-and-snapshot.yml +++ b/.github/workflows/test-and-snapshot.yml @@ -54,7 +54,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11', '17' ] + java: [ '11', '17' ] steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d011121..4543fbf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11', '16', '17', '18' ] + java: [ '11', '16', '17', '18' ] steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index ba12de0..e844cdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Only accretive/fixative changes will be made from now on. * 1.2.next in progress * Address [#218](https://github.com/seancorfield/next-jdbc/issues/218) by moving `:extend-via-metadata true` after the protocols' docstrings. * Document `:useBulkCopyForBatchInsert` for Microsoft SQL Server via PR [#216](https://github.com/seancorfield/next-jdbc/issues/216) -- [danskarda](https://github.com/danskarda). + * Address [#215](https://github.com/seancorfield/next-jdbc/issues/215) by dropping official support for JDK 8 and updating various JDBC drivers in the testing matrix. * Address [#214](https://github.com/seancorfield/next-jdbc/issues/214) by updating test/CI versions. * Address [#212](https://github.com/seancorfield/next-jdbc/issues/212) by documenting the problem with SQLite's JDBC driver. * Fix [#211](https://github.com/seancorfield/next-jdbc/issues/211) by auto-creating `clojure_test` DB in MySQL if needed; also streamline the CI processes. diff --git a/deps.edn b/deps.edn index c996660..bf7f7a6 100644 --- a/deps.edn +++ b/deps.edn @@ -21,29 +21,23 @@ io.github.cognitect-labs/test-runner {:git/tag "v0.5.1" :git/sha "dfb30dd"} ;; connection pooling - ;; 5.0.0 is not compatible with JDK 8: - com.zaxxer/HikariCP {:mvn/version "3.4.2"} + com.zaxxer/HikariCP {:mvn/version "5.0.1"} com.mchange/c3p0 {:mvn/version "0.9.5.5"} ;; JDBC drivers - ;; compatible with JDK8+: - org.apache.derby/derby {:mvn/version "10.14.2.0"} - ;; compatible only with JDK9+: - ;; org.apache.derby/derby {:mvn/version "10.15.2.0"} - ;; org.apache.derby/derbyshared {:mvn/version "10.15.2.0"} - ;; 2.6.1 is not compatible with JDK 8: - org.hsqldb/hsqldb {:mvn/version "2.5.0"} - com.h2database/h2 {:mvn/version "1.4.200"} + org.apache.derby/derby {:mvn/version "10.16.1.1"} + org.apache.derby/derbyshared {:mvn/version "10.16.1.1"} + org.hsqldb/hsqldb {:mvn/version "2.7.0"} + com.h2database/h2 {:mvn/version "2.1.214"} net.sourceforge.jtds/jtds {:mvn/version "1.3.1"} - org.mariadb.jdbc/mariadb-java-client {:mvn/version "2.7.4"} + org.mariadb.jdbc/mariadb-java-client {:mvn/version "3.0.7"} mysql/mysql-connector-java {:mvn/version "8.0.30"} - org.postgresql/postgresql {:mvn/version "42.4.1"} - io.zonky.test/embedded-postgres {:mvn/version "2.0.0"} - ;; 14.1.0 doesn't spin up fast enough: tests timeout at startup after 10s - io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64 {:mvn/version "14.4.0"} - io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64 {:mvn/version "14.4.0"} - io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64 {:mvn/version "14.4.0"} - org.xerial/sqlite-jdbc {:mvn/version "3.39.2.0"} - com.microsoft.sqlserver/mssql-jdbc {:mvn/version "9.4.1.jre8"} + org.postgresql/postgresql {:mvn/version "42.5.0"} + io.zonky.test/embedded-postgres {:mvn/version "2.0.1"} + io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64 {:mvn/version "14.5.0"} + io.zonky.test.postgres/embedded-postgres-binaries-linux-amd64 {:mvn/version "14.5.0"} + io.zonky.test.postgres/embedded-postgres-binaries-windows-amd64 {:mvn/version "14.5.0"} + org.xerial/sqlite-jdbc {:mvn/version "3.39.2.1"} + com.microsoft.sqlserver/mssql-jdbc {:mvn/version "11.2.0.jre11"} ;; supplementary test stuff ;; use log4j 2.x: org.apache.logging.log4j/log4j-api {:mvn/version "2.18.0"} diff --git a/test/next/jdbc/sql_test.clj b/test/next/jdbc/sql_test.clj index 2ede278..80c4ba7 100644 --- a/test/next/jdbc/sql_test.clj +++ b/test/next/jdbc/sql_test.clj @@ -8,7 +8,7 @@ [next.jdbc.sql :as sql] [next.jdbc.test-fixtures :refer [with-test-db ds column default-options - derby? jtds? maria? mssql? mysql? postgres? sqlite?]] + derby? jtds? maria? mssql? mysql? postgres? sqlite?]] [next.jdbc.types :refer [as-other as-real as-varchar]])) (set! *warn-on-reflection* true) @@ -115,6 +115,8 @@ [8M] (sqlite?) [8] + (maria?) + [6] :else [6 7 8]) (mapv new-key @@ -137,6 +139,8 @@ [11M] (sqlite?) [11] + (maria?) + [9] :else [9 10 11]) (mapv new-key @@ -159,6 +163,8 @@ [14M] (sqlite?) [14] + (maria?) + [12] :else [12 13 14]) (mapv new-key diff --git a/test/next/jdbc/test_fixtures.clj b/test/next/jdbc/test_fixtures.clj index 929bdd4..ec66be9 100644 --- a/test/next/jdbc/test_fixtures.clj +++ b/test/next/jdbc/test_fixtures.clj @@ -53,7 +53,7 @@ (println "...done!")))) (def ^:private test-mssql-map - {:dbtype "mssql" :dbname "model" + {:dbtype "mssql" :dbname "model" :encrypt false :trustServerCertificate true :user "sa" :password (System/getenv "MSSQL_SA_PASSWORD")}) (def ^:private test-mssql (when (System/getenv "NEXT_JDBC_TEST_MSSQL") test-mssql-map)) diff --git a/test/next/jdbc_test.clj b/test/next/jdbc_test.clj index e15094f..2cc3c26 100644 --- a/test/next/jdbc_test.clj +++ b/test/next/jdbc_test.clj @@ -327,7 +327,10 @@ VALUES ('Pear', 'green', 49, 47) (deftest issue-146 ;; since we use an embedded PostgreSQL data source, we skip this: - (when-not (postgres?) + (when-not (or (postgres?) + ;; and now we skip MS SQL because we can't use the db-spec + ;; we'd need to build the jdbcUrl with encryption turned off: + (and (mssql?) (not (jtds?)))) (testing "Hikari and SavePoints" (with-open [^HikariDataSource ds (c/->pool HikariDataSource (let [db (db)] @@ -798,7 +801,10 @@ INSERT INTO fruit (name, appearance) VALUES (?,?) (let [[url etc] (#'c/spec->url+etc (db)) ds (jdbc/get-datasource (assoc etc :jdbcUrl url))] (cond (derby?) (is (= {:create true} etc)) - (mssql?) (is (= #{:user :password} (set (keys etc)))) + (mssql?) (is (= (cond-> #{:user :password} + (not (jtds?)) + (conj :encrypt :trustServerCertificate)) + (set (keys etc)))) (mysql?) (is (= #{:user :password :useSSL :allowMultiQueries} (disj (set (keys etc)) :disableMariaDbDriver))) :else (is (= {} etc)))