-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MODFQMMGR-76: Periodically refresh materialized views #72
Conversation
import static org.mockito.Mockito.*; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
class MaterializedViewRefreshRepositoryTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured that since the logic for this is so simple, we really only need to ensure that the SQL that gets executed is what we expect, and thus could just use Mockito for this (rather than the docker test-db stuff).
@@ -144,6 +155,12 @@ | |||
"description": "Run a query synchronously and get results", | |||
"visible": true | |||
}, | |||
{ | |||
"permissionName": "fqm.materializedViews.post", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this permission (along with fqm.query.purge) is not part of fqm.query.all
@@ -91,6 +96,12 @@ | |||
"pathPattern": "/query/purge", | |||
"unit": "hour", | |||
"delay": "1" | |||
}, | |||
{ | |||
"methods": [ "POST" ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small thing, we can remove the spaces before and after (opening and ending) of ""
0859098
to
8f5e292
Compare
Kudos, SonarCloud Quality Gate passed! |
@@ -1,6 +1,6 @@ | |||
{ | |||
"id": "@artifactId@-@version@", | |||
"name": "The module descriptor for mod-fqm-manager.", | |||
"name": "FQM Manager Module", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
This drives me nuts every time I look at the list of installed modules in any environment 🙂
/materialized-views/refresh: | ||
post: | ||
operationId: refreshMaterializedViews | ||
tags: | ||
- materializedViews | ||
description: Refresh all materialized views for a tenant. | ||
responses: | ||
'204': | ||
description: 'Views refreshed' | ||
'400': | ||
$ref: '#/components/responses/badRequestResponse' | ||
'500': | ||
$ref: '#/components/responses/internalServerErrorResponse' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this here :) I meant to say something about it definitely not going in folio-query-tool-metadata (since that would put it in the edge module, too), and totally forgot
Purpose
Refresh materialized views to address MODFQMMGR-76
Testing