-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Various test cleanups and optimizations #14
Conversation
- Prevents deadlock with running store and test - Reduces contention with parallelized tests
@@ -31,22 +31,23 @@ func TestLoadingSavedSchedules(t *testing.T) { | |||
Eventually(func() []models.JobRun { | |||
store.Where("JobID", j.ID, &jobRuns) | |||
return jobRuns | |||
}).Should(HaveLen(1)) | |||
}).Should(cltest.HaveLenAtLeast(1)) |
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.
Cool.
t.Parallel() | ||
RegisterTestingT(t) | ||
store, cleanup := cltest.NewStore() | ||
defer cleanup() | ||
|
||
sched := services.NewScheduler(store) | ||
sched.Start() | ||
defer sched.Stop() |
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.
Nice catch!
@@ -15,7 +15,7 @@ func TestJobSave(t *testing.T) { | |||
store, cleanup := cltest.NewStore() | |||
defer cleanup() | |||
|
|||
j1 := cltest.NewJobWithSchedule("* * * * *") | |||
j1 := cltest.NewJobWithSchedule("* * * * 7") |
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 is so it is different than our test defaults?
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 overreacted on this one. In general, I'm just very wary of the cron jobs that run every second, so I tried to remove the ones that didn't need it. I don't think this test even uses a scheduler so it's moot.
@@ -9,7 +9,6 @@ import ( | |||
) | |||
|
|||
func TestGracefulShutdown(t *testing.T) { | |||
t.Parallel() |
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.
good find
…s-test-pt1 Various test cleanups and optimizations
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
…sation-for-FX-Commodity-contracts-on-Mainnet Create visualisation for FX/Commodity contracts on Mainnet
# This is the 1st commit message: update contract # This is the commit message #2: make scripts executable # This is the commit message #3: upload base too # This is the commit message #4: try again # This is the commit message #5: gather changesets, print products out of scope # This is the commit message #6: fix product finding # This is the commit message #7: try again # This is the commit message #8: debug # This is the commit message #9: debug 2 # This is the commit message #10: grab only modified or added changesets # This is the commit message #11: try again 1 # This is the commit message #12: remove early exit # This is the commit message #13: place changesets in a subfolder in final artifact # This is the commit message #14: validate whether everything was generated
No description provided.