Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
32700730
Commit
32700730
authored
6 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
Make sure Max Cache Entry Size setting handles string inputs correctly
parent
b4286b2f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/public_settings.clj
+4
-1
4 additions, 1 deletion
src/metabase/public_settings.clj
test/metabase/public_settings_test.clj
+7
-0
7 additions, 0 deletions
test/metabase/public_settings_test.clj
with
11 additions
and
1 deletion
src/metabase/public_settings.clj
+
4
−
1
View file @
32700730
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
test/metabase/public_settings_test.clj
+
7
−
0
View file @
32700730
...
...
@@ -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"
)))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment