aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-04-06 14:00:11 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-06 14:00:11 +0000
commit3000fdca611c32b7001c553621660b8ea0d2eb49 (patch)
treeec698ea6a1ea847cd96956ce5d39c01358de1439 /models-interactions
parente55503959d257661bc3bac4f5e4dfc0726c9f6ae (diff)
parentea9113151c030efdd9b393787f1e57bc72734e88 (diff)
Merge "Models junits are failing locally"
Diffstat (limited to 'models-interactions')
-rw-r--r--models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/AbatedTest.java2
-rw-r--r--models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalAbatedTest.java4
-rw-r--r--models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/CanonicalOnsetTest.java4
-rw-r--r--models-interactions/model-impl/events/src/test/java/org/onap/policy/controlloop/OnsetTest.java2
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);