Commit 0a3b3ec5 authored by Martin Lowe's avatar Martin Lowe 🇨🇦
Browse files

Fix broken test that still used util.date instead of Java 8 datetime

parent 28d830c5
Pipeline #1750 passed with stage
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment