Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Foundation
IT
Websites
membership.eclipse.org
Commits
0a3b3ec5
Commit
0a3b3ec5
authored
Jan 13, 2022
by
Martin Lowe
🇨🇦
Browse files
Fix broken test that still used util.date instead of Java 8 datetime
parent
28d830c5
Pipeline
#1750
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/eclipsefoundation/react/test/helper/DtoHelper.java
View file @
0a3b3ec5
package
org.eclipsefoundation.react.test.helper
;
import
java.time.
Instant
;
import
java.time.
OffsetDateTime
;
import
java.time.temporal.ChronoUnit
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Random
;
...
...
@@ -108,8 +107,7 @@ public class DtoHelper {
wg
.
setWorkingGroupID
(
RandomStringUtils
.
randomAlphabetic
(
4
,
10
));
wg
.
setParticipationLevel
(
RandomStringUtils
.
randomAlphabetic
(
4
,
10
));
// get a random instance of time
Instant
inst
=
Instant
.
now
().
minus
(
r
.
nextInt
(
1000000
),
ChronoUnit
.
SECONDS
);
wg
.
setEffectiveDate
(
new
Date
(
inst
.
getEpochSecond
()));
wg
.
setEffectiveDate
(
OffsetDateTime
.
now
().
minus
(
r
.
nextInt
(
1000000
),
ChronoUnit
.
SECONDS
));
wg
.
setContact
(
generateContact
(
form
,
Optional
.
empty
()));
wg
.
setForm
(
form
);
return
wg
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment