Skip to content

Commit a395f23

Browse files
austbZak-Kent
authored andcommitted
(maint) Log a warning when the db-up? query fails
This is intended to log an error in PE tests without having to configure logback.xml. Before releasing, this should be removed or changed to log at the debug level
1 parent 1abc7a0 commit a395f23

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/puppetlabs/puppetdb/scf/storage_utils.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@
372372
(let [select-42 "SELECT (a - b) AS answer FROM (VALUES ((7 * 7), 7)) AS x(a, b)"
373373
[{:keys [answer]}] (jdbc/query [select-42])]
374374
(= answer 42)))
375-
(catch Exception _
375+
(catch Exception e
376+
(log/warn e "Query to check if the database is up failed")
376377
false))))
377378

378379
(defn analyze-small-tables

0 commit comments

Comments
 (0)