Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
e2ca8a86
Commit
e2ca8a86
authored
4 years ago
by
uhensler
Browse files
Options
Downloads
Patches
Plain Diff
OO-4999: Relax date comparison
parent
69e802c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/olat/modules/quality/generator/provider/courselectures/CourseLecturesProviderTest.java
+1
-3
1 addition, 3 deletions
...r/provider/courselectures/CourseLecturesProviderTest.java
with
1 addition
and
3 deletions
src/test/java/org/olat/modules/quality/generator/provider/courselectures/CourseLecturesProviderTest.java
+
1
−
3
View file @
e2ca8a86
...
...
@@ -21,10 +21,8 @@ package org.olat.modules.quality.generator.provider.courselectures;
import
static
java
.
lang
.
String
.
valueOf
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
assertThat
;
import
static
org
.
assertj
.
core
.
api
.
Assertions
.
within
;
import
static
org
.
olat
.
test
.
JunitTestHelper
.
random
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Date
;
...
...
@@ -236,7 +234,7 @@ public class CourseLecturesProviderTest extends OlatTestCase {
dbInstance
.
commitAndCloseSession
();
Date
beforeEndAsConfigured
=
DateUtils
.
addMinutes
(
lectureEnd
,
-
startDataCollectionBeforeEnd
);
long
withinAMinute
=
within
(
1
,
ChronoUnit
.
MINUTES
).
getValue
()
;
long
withinAMinute
=
60
*
1000
;
Date
deadline
=
DateUtils
.
addDays
(
beforeEndAsConfigured
,
durationDays
);
assertThat
(
dataCollection
.
getStart
()).
isCloseTo
(
beforeEndAsConfigured
,
withinAMinute
);
assertThat
(
dataCollection
.
getDeadline
()).
isCloseTo
(
deadline
,
withinAMinute
);
...
...
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