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
b7fdc719
Unverified
Commit
b7fdc719
authored
5 years ago
by
Cam Saul
Browse files
Options
Downloads
Patches
Plain Diff
Fix occasional test failures because a timeout was too short
parent
bb90acae
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/metabase/events/sync_database.clj
+2
-4
2 additions, 4 deletions
src/metabase/events/sync_database.clj
test/metabase/task/sync_databases_test.clj
+5
-3
5 additions, 3 deletions
test/metabase/task/sync_databases_test.clj
with
7 additions
and
7 deletions
src/metabase/events/sync_database.clj
+
2
−
4
View file @
b7fdc719
...
...
@@ -19,7 +19,7 @@
(
async/chan
))
;;;
##
---------------------------------------- EVENT PROCESSING ----------------------------------------
;;;
--------
---------------------------------------- EVENT PROCESSING ----------------------------------------
--------
(
defn
process-sync-database-event
...
...
@@ -41,9 +41,7 @@
(
log/warn
e
(
trs
"Failed to process sync-database event."
)
(
:topic
sync-database-event
)))))
;;; ## ---------------------------------------- LIFECYLE ----------------------------------------
;;; ---------------------------------------------------- LIFECYLE ----------------------------------------------------
(
defn
events-init
"Automatically called during startup; start event listener for database sync events."
...
...
This diff is collapsed.
Click to expand it.
test/metabase/task/sync_databases_test.clj
+
5
−
3
View file @
b7fdc719
...
...
@@ -150,6 +150,8 @@
;;; | CHECKING THAT SYNC TASKS RUN CORRECT FNS |
;;; +----------------------------------------------------------------------------------------------------------------+
;; TODO - it would be nice if we could rework this test so we didn't have to wait for so long to see if things
;; happened or not
(
defn-
check-if-sync-processes-ran-for-db
{
:style/indent
0
}
[
db-info
]
(
let
[
sync-db-metadata-ran?
(
promise
)
analyze-db-ran?
(
promise
)
...
...
@@ -159,9 +161,9 @@
metabase.sync.field-values/update-field-values!
(
fn
[
&
_
]
(
deliver
update-field-values-ran?
true
))]
(
with-scheduler-setup
(
tt/with-temp
Database
[
database
db-info
]
{
:ran-sync?
(
deref
sync-db-metadata-ran?
5
00
false
)
:ran-analyze?
(
deref
analyze-db-ran?
1
00
false
)
:ran-update-field-values?
(
deref
update-field-values-ran?
500
false
)})))))
{
:ran-sync?
(
deref
sync-db-metadata-ran?
10
00
false
)
:ran-analyze?
(
deref
analyze-db-ran?
2
00
false
)
:ran-update-field-values?
(
deref
update-field-values-ran?
500
false
)})))))
(
defn-
cron-schedule-for-next-year
[]
(
format
"0 15 10 * * ? %d"
(
inc
(
du/date-extract
:year
))))
...
...
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