use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class DLockManagementDUnitTest method awaitLockServiceMXBeanIsNull.
/**
* Await destruction of local LockServiceMXBean for specified lockServiceName.
*/
private void awaitLockServiceMXBeanIsNull(final String lockServiceName) {
SystemManagementService service = this.managementTestRule.getSystemManagementService();
await().until(() -> assertThat(service.getLocalLockServiceMBean(lockServiceName)).isNull());
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class DLockManagementDUnitTest method awaitLockServiceMXBean.
/**
* Await creation of local LockServiceMXBean for specified lockServiceName.
*/
private LockServiceMXBean awaitLockServiceMXBean(final String lockServiceName) {
SystemManagementService service = this.managementTestRule.getSystemManagementService();
await().until(() -> assertThat(service.getLocalLockServiceMBean(lockServiceName)).isNotNull());
return service.getLocalLockServiceMBean(lockServiceName);
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class DiskManagementDUnitTest method compactDiskStoresRemote.
/**
* Compact a disk store from managerVM VM
*/
private void compactDiskStoresRemote(final VM managerVM, final int memberCount) {
managerVM.invoke("compactDiskStoresRemote", () -> {
Set<DistributedMember> otherMemberSet = this.managementTestRule.getOtherNormalMembers();
assertThat(otherMemberSet.size()).isEqualTo(memberCount);
SystemManagementService service = this.managementTestRule.getSystemManagementService();
for (DistributedMember member : otherMemberSet) {
MemberMXBean memberMXBean = awaitMemberMXBeanProxy(member);
String[] allDisks = memberMXBean.listDiskStores(true);
assertThat(allDisks).isNotNull().hasSize(1);
String[] compactedDiskStores = memberMXBean.compactAllDiskStores();
assertThat(compactedDiskStores).hasSize(1);
}
});
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class DiskManagementDUnitTest method awaitMemberMXBeanProxy.
private MemberMXBean awaitMemberMXBeanProxy(final DistributedMember member) {
SystemManagementService service = this.managementTestRule.getSystemManagementService();
ObjectName objectName = service.getMemberMBeanName(member);
await().until(() -> assertThat(service.getMBeanProxy(objectName, MemberMXBean.class)).isNotNull());
return service.getMBeanProxy(objectName, MemberMXBean.class);
}
use of org.apache.geode.management.internal.SystemManagementService in project geode by apache.
the class RegionManagementDUnitTest method createSubRegion_tmp.
private void createSubRegion_tmp(final VM vm, final String parentRegionPath, final String subregionName) {
vm.invoke("Create Sub region", () -> {
SystemManagementService service = getSystemManagementService_tmp();
Region region = getCache_tmp().getRegion(parentRegionPath);
region.createSubregion(subregionName, region.getAttributes());
});
}
Aggregations