From fbd697edb011df4c5ebf234dfc1612396c6f8a42 Mon Sep 17 00:00:00 2001 From: mharindu Date: Tue, 8 Sep 2015 11:27:29 +0530 Subject: [PATCH] Fixed issue in policy delegation executor --- .../policy/mgt/core/impl/PolicyAdministratorPointImpl.java | 3 +-- .../wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java index c536987bd43..5e63355f950 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/main/java/org/wso2/carbon/policy/mgt/core/impl/PolicyAdministratorPointImpl.java @@ -133,8 +133,7 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint { TaskInfo.TriggerInfo triggerInfo = new TaskInfo.TriggerInfo(); - triggerInfo.setIntervalMillis(0); - triggerInfo.setRepeatCount(1); + triggerInfo.setRepeatCount(0); Map properties = new HashMap<>(); properties.put(PolicyManagementConstants.TENANT_ID, String.valueOf(tenantId)); diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java index e1ebc13e9da..a74e85bf3ef 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/src/test/java/org/wso2/carbon/policy/mgt/core/PolicyEvaluationTestCase.java @@ -107,12 +107,12 @@ public class PolicyEvaluationTestCase extends BasePolicyManagementDAOTest { log.debug("Re-enforcing policy started...!"); - int sixe = policies.size(); + int size = policies.size(); sortPolicies(policies); int x = 0; for (Policy policy : policies) { - policy.setPriorityId(sixe - x); + policy.setPriorityId(size - x); x++; }