Fix test failures

revert-70ac1926
Pahansith 4 years ago
parent 0cbcd747d5
commit 2fa4a6167e

@ -46,13 +46,11 @@ import java.util.concurrent.Executors;
public class EventConfigurationProviderServiceImpl implements EventConfigurationProviderService {
private static final Log log = LogFactory.getLog(EventConfigurationProviderServiceImpl.class);
private final EventConfigDAO eventConfigDAO;
private final ExecutorService executorService;
public EventConfigurationProviderServiceImpl() {
eventConfigDAO = DeviceManagementDAOFactory.getEventConfigDAO();
EventOperationTaskConfiguration eventConfig = DeviceConfigurationManager.getInstance()
.getDeviceManagementConfig().getEventOperationTaskConfiguration();
this.executorService = Executors.newFixedThreadPool(eventConfig.getPoolSize());
}
@Override
@ -251,6 +249,7 @@ public class EventConfigurationProviderServiceImpl implements EventConfiguration
List<Integer> groupIds) {
GeoFenceEventOperationManager geoFenceEventOperationManager = new GeoFenceEventOperationManager(eventType, tenantId, null);
EventOperationExecutor executor = geoFenceEventOperationManager.getEventOperationExecutor(groupIds, eventMeta);
this.executorService.submit(executor);
ExecutorService executorService = Executors.newFixedThreadPool(50);
executorService.submit(executor);
}
}

@ -32,13 +32,4 @@ public class EventOperationTaskConfiguration {
public void setEnabled(boolean enabled) {
this.isEnabled = enabled;
}
@XmlElement(name = "PoolSize", required = true)
public int getPoolSize() {
return poolSize;
}
public void setPoolSize(int poolSize) {
this.poolSize = poolSize;
}
}

@ -66,7 +66,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
private final GroupDAO groupDAO;
private final DeviceDAO deviceDAO;
private final ExecutorService executorService;
/**
* Set groupDAO from GroupManagementDAOFactory when class instantiate.
@ -74,9 +73,6 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
public GroupManagementProviderServiceImpl() {
this.groupDAO = GroupManagementDAOFactory.getGroupDAO();
this.deviceDAO = DeviceManagementDAOFactory.getDeviceDAO();
EventOperationTaskConfiguration eventConfig = DeviceConfigurationManager.getInstance()
.getDeviceManagementConfig().getEventOperationTaskConfiguration();
this.executorService = Executors.newFixedThreadPool(eventConfig.getPoolSize());
}
/**
@ -1072,6 +1068,7 @@ public class GroupManagementProviderServiceImpl implements GroupManagementProvid
GeoFenceEventOperationManager eventManager = new GeoFenceEventOperationManager(eventOperationCode, tenantId, null);
GroupAssignmentEventOperationExecutor eventOperationExecutor = eventManager
.getGroupAssignmentEventExecutor(groupId, deviceIdentifiers);
ExecutorService executorService = Executors.newFixedThreadPool(50);
if (eventOperationExecutor != null) {
executorService.submit(eventOperationExecutor);
} else {

@ -97,6 +97,9 @@
server environment-->
<Capacity>10000</Capacity>
</GeoFenceCacheConfiguration>
<EventOperationTaskConfiguration>
<Enable>true</Enable>
</EventOperationTaskConfiguration>
<CertificateCacheConfiguration>
<Enable>false</Enable>
<ExpiryTime>86400</ExpiryTime>

@ -121,6 +121,9 @@
<GeoLocationConfiguration>
<Enabled>false</Enabled>
</GeoLocationConfiguration>
<EventOperationTaskConfiguration>
<Enable>true</Enable>
</EventOperationTaskConfiguration>
<OperationAnalyticsConfiguration>
<PublishLocationResponse>false</PublishLocationResponse>
<PublishDeviceInfoResponse>false</PublishDeviceInfoResponse>

@ -96,8 +96,6 @@
</GeoFenceCacheConfiguration>
<EventOperationTaskConfiguration>
<Enable>true</Enable>
<!-- Event operation creation thread pool size -->
<PoolSize>50</PoolSize>
</EventOperationTaskConfiguration>
<CertificateCacheConfiguration>
<Enable>true</Enable>

Loading…
Cancel
Save