aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamasBakai <tamas.bakai@est.tech>2019-05-02 13:31:57 +0000
committerTamasBakai <tamas.bakai@est.tech>2019-05-02 13:31:57 +0000
commit8700ab0c505067ac00fe00714d3fdfd2b23d676e (patch)
treeef876c565901374cd962a4e153ce20d3ef86df3c
parent6c68bee53a13edf15a72ae349adf4592a2560811 (diff)
Unit test instability fix
simulator_should_send_fileready_message test was failing in maven, but working well in eclipse. Duration and Interval are now equal, and exactly 1 trigger should occur regardless of the execution environment. Change-Id: I9f283364d4717c6e4aa45b88ee7e9da393fa11c4 Issue-ID: DCAEGEN2-1434 Signed-off-by: TamasBakai <tamas.bakai@est.tech>
-rw-r--r--test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java
index 7ed9f04c2..fb812b598 100644
--- a/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java
+++ b/test/mocks/mass-pnf-sim/pnf-sim-lightweight/src/test/java/org/onap/pnfsimulator/simulator/SimulatorTest.java
@@ -109,7 +109,7 @@ public class SimulatorTest {
void should_throw_noropfiles_exception_given_empty_filelist() {
Simulator simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(VALID_PNF_REGISTRATION_PARAMS)
.withNotificationParams(Optional.empty())
@@ -127,7 +127,7 @@ public class SimulatorTest {
Simulator simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(INVALID_PNF_REGISTRATION_PARAMS_1)
.withNotificationParams(Optional.empty())
@@ -140,7 +140,7 @@ public class SimulatorTest {
simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(INVALID_PNF_REGISTRATION_PARAMS_2)
.withNotificationParams(Optional.empty())
@@ -153,7 +153,7 @@ public class SimulatorTest {
simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(INVALID_PNF_REGISTRATION_PARAMS_3)
.withNotificationParams(Optional.empty())
@@ -166,7 +166,7 @@ public class SimulatorTest {
simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(VALID_PNF_REGISTRATION_PARAMS)
.withNotificationParams(INVALID_NOTIFICATION_PARAMS)
@@ -185,7 +185,7 @@ public class SimulatorTest {
HttpClientAdapter httpClientMock = Mockito.mock(HttpClientAdapter.class);
Simulator simulator = Simulator.builder()
.withDuration(Duration.ofMillis(100))
- .withInterval(Duration.ofMillis(10))
+ .withInterval(Duration.ofMillis(100))
.withCommonEventHeaderParams(VALID_COMMON_EVENT_HEADER_PARAMS)
.withPnfRegistrationParams(Optional.empty())
.withNotificationParams(VALID_NOTIFICATION_PARAMS)