Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-1501

policy-engine JUnit tests are not independent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Lowest Lowest
    • Dublin Release
    • Casablanca Release, Dublin Release, Casablanca Maintenance Release
    • None
    • None

      The JUnit tests of policy-engine are not independent of execution order. At least the following dependencies are found in org.onap.policy.pdp.rest.api.test.PolicyEngineServicesTest:

      • listPolicyTest() requires System property "xacml.rest.pdp.config" to be "config" to pass, but does not ensure it in any way - if any test case that sets the property  to "src/test/resources/config_testing" is executed before listPolicyTest(), it fails
      • actionDecisionPolicyCreationTests(), createUpdateDictionaryTests(), deletePolicyTest() and getMetricsTest() all require the very suspicious static PAPServices.isJunit parameter to be false to pass, but do not ensure it in any way. If any test case executed before any of these leaves it to true, these test cases will fail

       

            kaihlavi kaihlavi
            kaihlavi kaihlavi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: