Skip to content
Snippets Groups Projects
Commit 32700730 authored by Cam Saul's avatar Cam Saul
Browse files

Make sure Max Cache Entry Size setting handles string inputs correctly

parent b4286b2f
No related branches found
No related tags found
No related merge requests found
......@@ -108,7 +108,10 @@
:type :integer
:default 1000
:setter (fn [new-value]
(when (> new-value global-max-caching-kb)
(when (and new-value
(> (cond-> new-value
(string? new-value) Integer/parseInt)
global-max-caching-kb))
(throw (IllegalArgumentException.
(str
(tru "Failed setting `query-caching-max-kb` to {0}." new-value)
......
......@@ -49,3 +49,10 @@
(i18n/with-user-locale zz
[(= zz (i18n/user-locale))
(tru "Host")])))
;; Make sure Max Cache Entry Size can be set via with a string value, which is what comes back from the API (#9143)
(expect
"1000"
;; use with temp value macro so original value gets reset after test run
(tu/with-temporary-setting-values [query-caching-max-kb nil]
(public-settings/query-caching-max-kb "1000")))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment