Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Job Queues
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Go
Services
Job Queues
Commits
d7b8d8e5
Verified
Commit
d7b8d8e5
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
fix: race
parent
4c1153bc
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
database-5_test.go
+2
-0
2 additions, 0 deletions
database-5_test.go
database-6_test.go
+5
-1
5 additions, 1 deletion
database-6_test.go
with
7 additions
and
1 deletion
database-5_test.go
+
2
−
0
View file @
d7b8d8e5
...
...
@@ -43,7 +43,9 @@ func TestWriteToDB5(t *testing.T) {
err
=
mgr
.
CancelJobSchedule
(
"jobSameID"
)
assert
.
Nil
(
t
,
err
)
mgr
.
mu
.
Lock
()
err
=
mgr
.
jobSyncer
.
Stop
()
mgr
.
mu
.
Unlock
()
assert
.
Nil
(
t
,
err
)
...
...
This diff is collapsed.
Click to expand it.
database-6_test.go
+
5
−
1
View file @
d7b8d8e5
...
...
@@ -47,12 +47,16 @@ func TestWriteToDB6(t *testing.T) {
err
=
mgr
.
ScheduleJob
(
job
,
scheduler
)
assert
.
Nil
(
t
,
err
)
mgr
.
mu
.
Lock
()
mgr
.
jobSyncer
.
AddJob
(
job
)
mgr
.
mu
.
Unlock
()
time
.
Sleep
(
10
*
time
.
Millisecond
)
}
mgr
.
jobSyncer
.
Stop
()
mgr
.
mu
.
Lock
()
_
=
mgr
.
jobSyncer
.
Stop
()
mgr
.
mu
.
Unlock
()
time
.
Sleep
(
2
*
time
.
Second
)
...
...
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