From b2656120b4f566efac322386ddc662598410f643 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Wed, 25 Sep 2024 14:29:31 -0700 Subject: [PATCH] handle "bug fix" in PG 4.7.4 Signed-off-by: Sean Corfield --- deps.edn | 1 + test/next/jdbc_test.clj | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/deps.edn b/deps.edn index 3ffecaf..ba7b8f7 100644 --- a/deps.edn +++ b/deps.edn @@ -32,6 +32,7 @@ net.sourceforge.jtds/jtds {:mvn/version "1.3.1"} org.mariadb.jdbc/mariadb-java-client {:mvn/version "3.4.1"} com.mysql/mysql-connector-j {:mvn/version "9.0.0"} + ;; 42.7.4 changes update count (to -1) for stored procs: org.postgresql/postgresql {:mvn/version "42.7.4"} io.zonky.test/embedded-postgres {:mvn/version "2.0.7"} io.zonky.test.postgres/embedded-postgres-binaries-darwin-amd64 {:mvn/version "16.4.0"} diff --git a/test/next/jdbc_test.clj b/test/next/jdbc_test.clj index 1b895ab..9bbb640 100644 --- a/test/next/jdbc_test.clj +++ b/test/next/jdbc_test.clj @@ -904,9 +904,9 @@ INSERT INTO fruit (name, appearance) VALUES (?,?) {:multi-rs true}) zero-updates [{:next.jdbc/update-count 0}]] (cond (postgres?) ; does not support multiple result sets yet - (do - (is (= 1 (count multi-rs))) - (is (= zero-updates (first multi-rs)))) + ;; 4.7.3 (and earlier?) returned the fake zero-updates + ;; 4.7.4 returns -1 for update count and an empty result set + (is (= 0 (count multi-rs))) (hsqldb?) (do (is (= 3 (count multi-rs)))