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
Compare revisions
v1.15.2 to v1.15.3
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
oss/libraries/go/services/job-queues
Select target project
No results found
v1.15.3
Select Git revision
Swap
Target
oss/libraries/go/services/job-queues
Select target project
oss/libraries/go/services/job-queues
1 result
v1.15.2
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
fix: wrong interval assignment
#37
· d87d138f
Volker Schukai
authored
1 year ago
d87d138f
fix: fix tests
#38
· a4f3252d
Volker Schukai
authored
1 year ago
a4f3252d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
schedule-interval_test.go
+2
-2
2 additions, 2 deletions
schedule-interval_test.go
scheduler.go
+1
-1
1 addition, 1 deletion
scheduler.go
scheduler_test.go
+1
-1
1 addition, 1 deletion
scheduler_test.go
with
4 additions
and
4 deletions
schedule-interval_test.go
View file @
a4f3252d
...
...
@@ -28,7 +28,7 @@ interval: "1h30m"
assert
.
Equal
(
t
,
expectedTime
,
*
sp
.
Time
,
"the time should be parsed correctly"
)
expectedInterval
,
_
:=
time
.
ParseDuration
(
"1h30m"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Delay
,
"the interval should be parsed correctly"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Interval
,
"the interval should be parsed correctly"
)
}
// TestUnmarshalJSON tests the UnmarshalJSON method
...
...
@@ -56,5 +56,5 @@ func TestUnmarshalJSON(t *testing.T) {
// Verify that the Delay field is correctly parsed
expectedInterval
,
_
:=
time
.
ParseDuration
(
"1h30m"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Delay
,
"Interval should be correctly parsed"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Interval
,
"Interval should be correctly parsed"
)
}
This diff is collapsed.
Click to expand it.
scheduler.go
View file @
a4f3252d
...
...
@@ -78,7 +78,7 @@ func (sp *SchedulerPersistence) parseAndAssignFields(aux scheduleImportStruct) e
if
err
!=
nil
{
return
err
}
sp
.
Delay
=
d
sp
.
Interval
=
d
}
if
aux
.
Delay
!=
nil
&&
*
aux
.
Delay
!=
""
{
...
...
This diff is collapsed.
Click to expand it.
scheduler_test.go
View file @
a4f3252d
...
...
@@ -430,6 +430,6 @@ time: "2023-12-15T12:00:00Z"
// Prüfen, ob die Werte korrekt unmarshalled wurden
assert
.
Equal
(
t
,
"interval"
,
sp
.
Type
,
"Type should be unmarshalled correctly"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Delay
,
"Interval should be unmarshalled correctly"
)
assert
.
Equal
(
t
,
expectedInterval
,
sp
.
Interval
,
"Interval should be unmarshalled correctly"
)
assert
.
Equal
(
t
,
&
expectedTime
,
sp
.
Time
,
"Time should be unmarshalled correctly"
)
}
This diff is collapsed.
Click to expand it.