Use pseudo time for junits 53/94053/3
authorJim Hahn <jrh3@att.com>
Wed, 14 Aug 2019 21:31:50 +0000 (17:31 -0400)
committerJim Hahn <jrh3@att.com>
Wed, 21 Aug 2019 17:49:54 +0000 (13:49 -0400)
commitdfe8fa8bc3e75c186589d21b619baa55454ef8a2
treeca3c7dbbe53815afdacb1c97e62ee97ace3f867c
parent59e9b9a8b56d563814ef21a23716959f772f9194
Use pseudo time for junits

Modified feature-active-standby-management and feature-lifecycle
to be able to use TestTimeMulti, eliminating the need for sleep()
calls in the junit tests and speeding the tests up significantly.
Also modified feature-active-standby-management to use a memory DB
for its junit tests.

Change-Id: I6d7ae61bb73cbb19ff405b8d9fb660e92732edbb
Issue-ID: POLICY-1968
Signed-off-by: Jim Hahn <jrh3@att.com>
21 files changed:
feature-active-standby-management/pom.xml
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/ActiveStandbyFeature.java
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpEntity.java
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/DroolsPdpsElectionHandler.java
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/Factory.java [new file with mode: 0644]
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/JpaDroolsPdpsConnector.java
feature-active-standby-management/src/main/java/org/onap/policy/drools/activestandby/PmStandbyStateChangeNotifier.java
feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/AllSeemsWellTest.java [moved from feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java with 74% similarity]
feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/FactoryTest.java [new file with mode: 0644]
feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/PmStandbyStateChangeNotifierTest.java
feature-active-standby-management/src/test/java/org/onap/policy/drools/activestandby/StandbyStateManagementTest.java [moved from feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java with 79% similarity]
feature-active-standby-management/src/test/resources/META-INF/persistence.xml
feature-active-standby-management/src/test/resources/asw/feature-active-standby-management.properties
feature-active-standby-management/src/test/resources/asw/feature-state-management.properties
feature-active-standby-management/src/test/resources/feature-active-standby-management.properties
feature-active-standby-management/src/test/resources/feature-state-management.properties
feature-lifecycle/pom.xml
feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateRunningTest.java