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
242847f4
Commit
242847f4
authored
7 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
no-jira: fix unit test which fails on saturday
parent
fa56aa7f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/olat/course/statistic/WeeklyStatisticUpdateManagerTest.java
+5
-0
5 additions, 0 deletions
...at/course/statistic/WeeklyStatisticUpdateManagerTest.java
with
5 additions
and
0 deletions
src/test/java/org/olat/course/statistic/WeeklyStatisticUpdateManagerTest.java
+
5
−
0
View file @
242847f4
...
...
@@ -119,6 +119,7 @@ public class WeeklyStatisticUpdateManagerTest extends AbstractStatisticUpdateMan
private
String
getWeekString
(
Calendar
start
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setFirstDayOfWeek
(
Calendar
.
MONDAY
);
cal
.
set
(
Calendar
.
YEAR
,
start
.
get
(
Calendar
.
YEAR
));
cal
.
set
(
Calendar
.
MONTH
,
start
.
get
(
Calendar
.
MONTH
));
cal
.
set
(
Calendar
.
DATE
,
start
.
get
(
Calendar
.
DATE
));
...
...
@@ -128,8 +129,10 @@ public class WeeklyStatisticUpdateManagerTest extends AbstractStatisticUpdateMan
cal
.
set
(
Calendar
.
MILLISECOND
,
0
);
if
(
dbInstance
.
isMySQL
())
{
weeklyMySQLFormat
.
setCalendar
(
cal
);
return
weeklyMySQLFormat
.
format
(
cal
.
getTime
());
}
weeklyFormat
.
setCalendar
(
cal
);
return
weeklyFormat
.
format
(
cal
.
getTime
());
}
...
...
@@ -146,7 +149,9 @@ public class WeeklyStatisticUpdateManagerTest extends AbstractStatisticUpdateMan
protected
String
addLogEntry
(
RepositoryEntry
repositoryEntry
,
CourseNode
courseNode
,
Calendar
start
,
int
dayInPast
,
int
hour
,
int
minute
,
int
second
)
{
Calendar
cal
=
addLog
(
repositoryEntry
.
getKey
(),
courseNode
.
getIdent
(),
start
,
dayInPast
,
hour
,
minute
,
second
);
String
week
=
getWeekString
(
cal
);
System
.
out
.
println
(
cal
.
getTime
()
+
" "
+
week
);
incrementInMemoryStatistics
(
repositoryEntry
.
getKey
(),
courseNode
.
getIdent
(),
week
);
return
week
;
}
...
...
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