diff options
Diffstat (limited to 'feature-active-standby-management')
-rw-r--r-- | feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java index 0ad21f03..b79deeb0 100644 --- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java +++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java @@ -219,27 +219,14 @@ public class StandbyStateManagementTest { Properties activeStandbyProperties = new Properties(); activeStandbyProperties.load(new FileInputStream(new File( configDir + "/feature-active-standby-management.properties"))); + + String resourceName = "testPMS"; + activeStandbyProperties.setProperty("resource.name", resourceName); ActiveStandbyProperties.initProperties(activeStandbyProperties); - String thisPdpId = ActiveStandbyProperties.getProperty(ActiveStandbyProperties.NODE_NAME); - logger.debug("testPMStandbyStateChangeNotifier: Getting StateManagementFeatureAPI"); - - StateManagementFeatureAPI sm = null; - for (StateManagementFeatureAPI feature : StateManagementFeatureAPI.impl.getList()) - { - ((PolicySessionFeatureAPI) feature).globalInit(null, configDir); - sm = feature; - logger.debug("testPMStandbyStateChangeNotifier stateManagementFeature.getResourceName(): {}", sm.getResourceName()); - break; - } - if(sm == null){ - logger.error("testPMStandbyStateChangeNotifier failed to initialize. " - + "Unable to get instance of StateManagementFeatureAPI " - + "with resourceID: {}", thisPdpId); - logger.debug("testPMStandbyStateChangeNotifier failed to initialize. " - + "Unable to get instance of StateManagementFeatureAPI " - + "with resourceID: {}", thisPdpId); - } + logger.debug("testPMStandbyStateChangeNotifier: Getting StateManagement instance"); + + StateManagement sm = new StateManagement(emfx, resourceName); //Create an instance of the Observer PMStandbyStateChangeNotifier pmNotifier = new PMStandbyStateChangeNotifier(); |