diff options
author | Magnusen, Drew (dm741q) <dm741q@att.com> | 2018-01-18 15:20:59 -0600 |
---|---|---|
committer | Magnusen, Drew (dm741q) <dm741q@att.com> | 2018-01-18 15:21:15 -0600 |
commit | 9e2820c5820b3904e03cb7a4cb4292e864b1ca2b (patch) | |
tree | b2eeae2ef028f91cb4dc3cb25e0d341e79b80204 /feature-state-management/src/main | |
parent | 58361f3aa3969cc196ea81070633571bef5fe910 (diff) |
Resolve bug in DroolsPDPIntegrityMonitor
This fix ensures that the testServices, testRestClasses, tesManaged, and
testSwagger properties are all populated in the stateManagementProperties
object within DroolsPDPIntegrityMonitor class.
Issue-ID: POLICY-564
Change-Id: Ie517b19f61ab084416ce1e6f8418d69dc9e4f85d
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'feature-state-management/src/main')
-rw-r--r-- | feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java index 688631bb..0a4eb513 100644 --- a/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java +++ b/feature-state-management/src/main/java/org/onap/policy/drools/statemanagement/DroolsPDPIntegrityMonitor.java @@ -96,14 +96,10 @@ public class DroolsPDPIntegrityMonitor extends IntegrityMonitor // (the 'IntegrityMonitor' constructor does some additional verification) String testHost = stateManagementProperties.getProperty(StateManagementProperties.TEST_HOST); String testPort = stateManagementProperties.getProperty(StateManagementProperties.TEST_PORT); - String testServices = stateManagementProperties.getProperty(StateManagementProperties.TEST_SERVICES, - StateManagementProperties.TEST_SERVICES_DEFAULT); - String testRestClasses = stateManagementProperties.getProperty(StateManagementProperties.TEST_REST_CLASSES, - StateManagementProperties.TEST_REST_CLASSES_DEFAULT); - String testManaged = stateManagementProperties.getProperty(StateManagementProperties.TEST_MANAGED, - StateManagementProperties.TEST_MANAGED_DEFAULT); - String testSwagger = stateManagementProperties.getProperty(StateManagementProperties.TEST_SWAGGER, - StateManagementProperties.TEST_SWAGGER_DEFAULT); + String testServices = stateManagementProperties.getProperty(StateManagementProperties.TEST_SERVICES); + String testRestClasses = stateManagementProperties.getProperty(StateManagementProperties.TEST_REST_CLASSES); + String testManaged = stateManagementProperties.getProperty(StateManagementProperties.TEST_MANAGED); + String testSwagger = stateManagementProperties.getProperty(StateManagementProperties.TEST_SWAGGER); String resourceName = stateManagementProperties.getProperty(StateManagementProperties.RESOURCE_NAME); String fpMonitorInterval = stateManagementProperties.getProperty(StateManagementProperties.FP_MONITOR_INTERVAL); String failedCounterThreshold = stateManagementProperties.getProperty(StateManagementProperties.FAILED_COUNTER_THRESHOLD); @@ -123,6 +119,22 @@ public class DroolsPDPIntegrityMonitor extends IntegrityMonitor if (testPort == null){ missingProperty(StateManagementProperties.TEST_PORT); } + if (testServices == null) { + testServices = StateManagementProperties.TEST_SERVICES_DEFAULT; + stateManagementProperties.put(StateManagementProperties.TEST_SERVICES, testServices); + } + if (testRestClasses == null) { + testRestClasses = StateManagementProperties.TEST_REST_CLASSES_DEFAULT; + stateManagementProperties.put(StateManagementProperties.TEST_REST_CLASSES, testRestClasses); + } + if (testManaged == null) { + testManaged = StateManagementProperties.TEST_MANAGED_DEFAULT; + stateManagementProperties.put(StateManagementProperties.TEST_MANAGED, testManaged); + } + if (testSwagger == null) { + testSwagger = StateManagementProperties.TEST_SWAGGER_DEFAULT; + stateManagementProperties.put(StateManagementProperties.TEST_SWAGGER, testSwagger); + } if (!testServices.equals(StateManagementProperties.TEST_SERVICES_DEFAULT)){ logger.error(INVALID_PROPERTY_VALUE, StateManagementProperties.TEST_SERVICES, |