Fix test case failing

remotes/1728937285237262521/master
Dharmakeerthi Lasantha 1 year ago
parent 2cfa73206d
commit 1d94fb7de1

@ -70,6 +70,8 @@
io.entgra.device.mgt.core.device.mgt.core.operation.mgt;version="[5.0,6)", io.entgra.device.mgt.core.device.mgt.core.operation.mgt;version="[5.0,6)",
io.entgra.device.mgt.core.device.mgt.core.service;version="[5.0,6)", io.entgra.device.mgt.core.device.mgt.core.service;version="[5.0,6)",
io.entgra.device.mgt.core.device.mgt.core.task.impl;version="[5.0,6)", io.entgra.device.mgt.core.device.mgt.core.task.impl;version="[5.0,6)",
io.entgra.device.mgt.core.notification.logger;version="[5.0,6)",
io.entgra.device.mgt.core.notification.logger.impl;version="[5.0,6)",
io.entgra.device.mgt.core.policy.mgt.common;version="[5.0,6)", io.entgra.device.mgt.core.policy.mgt.common;version="[5.0,6)",
io.entgra.device.mgt.core.policy.mgt.common.monitor;version="[5.0,6)", io.entgra.device.mgt.core.policy.mgt.common.monitor;version="[5.0,6)",
io.entgra.device.mgt.core.policy.mgt.core.cache, io.entgra.device.mgt.core.policy.mgt.core.cache,
@ -126,9 +128,9 @@
<suiteXmlFiles> <suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles> </suiteXmlFiles>
<classpathDependencyExcludes> <!-- <classpathDependencyExcludes>-->
<classpathDependencyExclude>org.ops4j.pax.logging</classpathDependencyExclude> <!-- <classpathDependencyExclude>org.ops4j.pax.logging</classpathDependencyExclude>-->
</classpathDependencyExcludes> <!-- </classpathDependencyExcludes>-->
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -169,7 +171,7 @@
<dependency> <dependency>
<groupId>org.ops4j.pax.logging</groupId> <groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId> <artifactId>pax-logging-api</artifactId>
<scope>provided</scope> <!-- <scope>provided</scope>-->
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon</groupId> <groupId>org.wso2.carbon</groupId>
@ -283,9 +285,14 @@
<groupId>org.wso2.orbit.javax.xml.bind</groupId> <groupId>org.wso2.orbit.javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.device.mgt.core.device.mgt.extensions.logger</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.device.mgt.core.notification.logger</artifactId> <artifactId>io.entgra.device.mgt.core.notification.logger</artifactId>
<scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>

@ -642,8 +642,8 @@ public class PolicyManagerImpl implements PolicyManager {
@Override @Override
public void activatePolicy(int policyId) throws PolicyManagementException { public void activatePolicy(int policyId) throws PolicyManagementException {
try {
Policy policy = this.getPolicy(policyId); Policy policy = this.getPolicy(policyId);
try {
PolicyManagementDAOFactory.beginTransaction(); PolicyManagementDAOFactory.beginTransaction();
policyDAO.activatePolicy(policyId); policyDAO.activatePolicy(policyId);
policyDAO.recordUpdatedPolicy(policy); policyDAO.recordUpdatedPolicy(policy);

Loading…
Cancel
Save