diff options
8 files changed, 9 insertions, 33 deletions
diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java index d1b1ad6d..e0df4e63 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/IntegrityMonitorProperties.java @@ -22,9 +22,6 @@ package org.openecomp.policy.drools.core; import java.util.Properties; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - import org.openecomp.policy.common.logging.flexlogger.FlexLogger; import org.openecomp.policy.common.logging.flexlogger.Logger; diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java index c4301364..76dadd9e 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/core/RepositoryAudit.java @@ -24,15 +24,13 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.nio.file.attribute.BasicFileAttributes; -import java.nio.file.Files; -import java.nio.file.FileVisitor; import java.nio.file.FileVisitResult; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.SimpleFileVisitor; +import java.nio.file.attribute.BasicFileAttributes; import java.util.LinkedList; import java.util.Properties; -import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import org.openecomp.policy.common.logging.flexlogger.FlexLogger; diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java index 363e43c4..30877995 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/im/PMStandbyStateChangeNotifier.java @@ -45,11 +45,9 @@ import java.util.TimerTask; import org.openecomp.policy.common.im.StateChangeNotifier; import org.openecomp.policy.common.im.StateManagement; -import org.openecomp.policy.drools.controller.internal.MavenDroolsController; -import org.openecomp.policy.drools.core.IntegrityMonitorProperties; -import org.openecomp.policy.drools.event.comm.TopicEndpoint; import org.openecomp.policy.common.logging.flexlogger.FlexLogger; import org.openecomp.policy.common.logging.flexlogger.Logger; +import org.openecomp.policy.drools.core.IntegrityMonitorProperties; import org.openecomp.policy.drools.persistence.DroolsPdpsConnector; import org.openecomp.policy.drools.persistence.PersistenceFeature; import org.openecomp.policy.drools.system.PolicyEngine; diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java index 7a219148..d9c2d48f 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpObject.java @@ -31,7 +31,7 @@ public abstract class DroolsPdpObject implements DroolsPdp{ return false; } } - private int nullSafeCompare(Comparable one, Comparable two){ + private int nullSafeCompare(String one, String two){ if(one != null && two != null){ return one.compareTo(two); } diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java index 40a8a56b..045c4c25 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsPdpsElectionHandler.java @@ -180,7 +180,6 @@ public class DroolsPdpsElectionHandler implements ThreadRunningChecker { Collection<DroolsPdp> pdps = pdpsConnector.getDroolsPdps(); DroolsPdp designatedPdp = null; - DroolsPdp lowestPriorityPdp = null; logger.debug //System.out.println diff --git a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java index 89e310f0..247f9c81 100644 --- a/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java +++ b/policy-persistence/src/main/java/org/openecomp/policy/drools/persistence/DroolsSessionEntity.java @@ -28,6 +28,9 @@ import javax.persistence.Id; import javax.persistence.ManyToOne; @Entity public class DroolsSessionEntity implements Serializable, DroolsSession { + + private static final long serialVersionUID = -5495057038819948709L; + @Id @Column(name="pdpId", nullable=false) private String pdpId="-1"; diff --git a/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/IntegrityAuditIntegrationTest.java b/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/IntegrityAuditIntegrationTest.java index 6b654732..c57e3e97 100644 --- a/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/IntegrityAuditIntegrationTest.java +++ b/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/IntegrityAuditIntegrationTest.java @@ -36,24 +36,18 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; - -import org.openecomp.policy.common.logging.eelf.PolicyLogger; import org.openecomp.policy.common.ia.IntegrityAudit; -import org.openecomp.policy.common.im.AdministrativeStateException; -import org.openecomp.policy.common.im.IntegrityMonitor; -import org.openecomp.policy.common.im.StandbyStatusException; import org.openecomp.policy.common.im.StateManagement; -import org.openecomp.policy.drools.core.DroolsPDPIntegrityMonitor; +import org.openecomp.policy.common.logging.eelf.PolicyLogger; import org.openecomp.policy.drools.core.IntegrityMonitorProperties; import org.openecomp.policy.drools.core.PolicyContainer; import org.openecomp.policy.drools.im.PMStandbyStateChangeNotifier; import org.openecomp.policy.drools.persistence.DroolsPdpEntity; import org.openecomp.policy.drools.persistence.DroolsPdpImpl; import org.openecomp.policy.drools.persistence.DroolsPdpsConnector; -import org.openecomp.policy.drools.persistence.JpaDroolsPdpsConnector; import org.openecomp.policy.drools.persistence.DroolsPersistenceProperties; +import org.openecomp.policy.drools.persistence.JpaDroolsPdpsConnector; import org.openecomp.policy.drools.persistence.PersistenceFeature; import org.openecomp.policy.drools.persistence.XacmlPersistenceProperties; import org.openecomp.policy.drools.system.Main; @@ -67,14 +61,6 @@ public class IntegrityAuditIntegrationTest { public static final String INTEGRITY_MONITOR_PROPERTIES_FILE="src/test/server/config/IntegrityMonitor.properties"; - - /* - * Currently, the DroolsPdpsElectionHandler.DesignationWaiter is invoked every ten seconds, starting - * at ten seconds after the minute boundary (e.g. 13:05:10). So, an 80 second sleep should be - * sufficient to ensure that we wait for the DesignationWaiter to do its job, before - * checking the results. - */ - private long sleepTime = 80000; /* * Sleep 5 seconds after each test to allow interrupt (shutdown) recovery. diff --git a/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/StandbyStateManagementTest.java b/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/StandbyStateManagementTest.java index d1e6336b..b7c3d55e 100644 --- a/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/StandbyStateManagementTest.java +++ b/policy-persistence/src/test/java/org/openecomp/policy/drools/controller/test/StandbyStateManagementTest.java @@ -59,7 +59,6 @@ import org.openecomp.policy.drools.persistence.DroolsPersistenceProperties; import org.openecomp.policy.drools.persistence.JpaDroolsPdpsConnector; import org.openecomp.policy.drools.persistence.XacmlPersistenceProperties; import org.openecomp.policy.drools.system.Main; -import org.openecomp.policy.drools.system.PolicyEngine; /* * All JUnits are designed to run in the local development environment @@ -1401,10 +1400,6 @@ public class StandbyStateManagementTest { } logger.info("PolicyManagementRunner.run: Exiting"); } - - public void stopRunner() { - PolicyEngine.manager.shutdown(); - } } |