diff options
Diffstat (limited to 'models-interactions/model-impl/events/src/test/java/org/onap')
4 files changed, 6 insertions, 6 deletions
diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java index e1ef77e22..22ef769f9 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java @@ -41,7 +41,7 @@ public class AbatedTest { assertEquals(event.getClosedLoopAlarmStart(), abated.getClosedLoopAlarmStart()); assertEquals(ControlLoopEventStatus.ABATED, abated.getClosedLoopEventStatus()); - abated.setClosedLoopAlarmEnd(Instant.now()); + abated.setClosedLoopAlarmEnd(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); assertNotEquals(abated, event); assertEquals(new Abated(abated), abated); diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java index d7007bc97..5aa7497e9 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java @@ -38,8 +38,8 @@ public class CanonicalAbatedTest { CanonicalAbated abated2 = new CanonicalAbated(new Abated()); abated2.setRequestId(UUID.randomUUID()); - abated2.setClosedLoopAlarmStart(Instant.now()); - abated2.setClosedLoopAlarmEnd(Instant.now()); + abated2.setClosedLoopAlarmStart(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); + abated2.setClosedLoopAlarmEnd(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); CanonicalAbated abated3 = new CanonicalAbated(abated2); diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java index 7b0a43f9e..23e1fffbd 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java @@ -38,8 +38,8 @@ public class CanonicalOnsetTest { CanonicalOnset onset2 = new CanonicalOnset(new Onset()); onset2.setRequestId(UUID.randomUUID()); - onset2.setClosedLoopAlarmStart(Instant.now()); - onset2.setClosedLoopAlarmEnd(Instant.now()); + onset2.setClosedLoopAlarmStart(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); + onset2.setClosedLoopAlarmEnd(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); CanonicalOnset onset3 = new CanonicalOnset(onset2); diff --git a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java index b229b024b..5dadff1b6 100644 --- a/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java +++ b/models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java @@ -42,7 +42,7 @@ public class OnsetTest { assertEquals(ControlLoopEventStatus.ONSET, onset.getClosedLoopEventStatus()); assertEquals(event.getClosedLoopAlarmEnd(), onset.getClosedLoopAlarmEnd()); - onset.setClosedLoopAlarmEnd(Instant.now()); + onset.setClosedLoopAlarmEnd(Instant.ofEpochSecond(Instant.now().getEpochSecond() + 1)); assertNotEquals(onset, event); assertEquals(new Onset(onset), onset); |