From 8700ab0c505067ac00fe00714d3fdfd2b23d676e Mon Sep 17 00:00:00 2001 From: TamasBakai Date: Thu, 2 May 2019 13:31:57 +0000 Subject: 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 --- .../java/org/onap/pnfsimulator/simulator/SimulatorTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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) -- cgit 1.2.3-korg