use of org.apache.geode.distributed.DistributedMember in project geode by apache.
the class CacheManagementDUnitTest method testGemFireConfigData.
@Test
public void testGemFireConfigData() throws Exception {
this.managementTestRule.createMembers();
this.managementTestRule.createManagers();
Map<DistributedMember, DistributionConfig> configMap = new HashMap<>();
for (VM memberVM : this.memberVMs) {
Map<DistributedMember, DistributionConfig> configMapMember = memberVM.invoke(() -> verifyConfigData());
configMap.putAll(configMapMember);
}
this.managerVM.invoke(() -> verifyConfigDataRemote(configMap));
}
use of org.apache.geode.distributed.DistributedMember in project geode by apache.
the class ClientHealthStatsDUnitTest method testClientHealthStats_SubscriptionEnabled.
@Test
public void testClientHealthStats_SubscriptionEnabled() throws Exception {
this.managementTestRule.createManager(this.managerVM, false);
this.managementTestRule.startManager(this.managerVM);
int port = this.serverVM.invoke(() -> createServerCache());
this.client1VM.invoke(() -> createClientCache(this.hostName, port, 1, true));
this.client2VM.invoke(() -> createClientCache(this.hostName, port, 2, true));
DistributedMember serverMember = this.managementTestRule.getDistributedMember(this.serverVM);
this.managerVM.invoke(() -> verifyClientStats(serverMember, port, 2));
this.managementTestRule.stopManager(this.managerVM);
}
use of org.apache.geode.distributed.DistributedMember in project geode by apache.
the class ClientHealthStatsDUnitTest method testClientHealthStats_DurableClient.
@Test
public void testClientHealthStats_DurableClient() throws Exception {
this.managementTestRule.createManager(this.managerVM, false);
this.managementTestRule.startManager(this.managerVM);
int port = this.serverVM.invoke(() -> createServerCache());
this.client1VM.invoke(() -> createClientCache(this.hostName, port, 1, true));
this.client2VM.invoke(() -> createClientCache(this.hostName, port, 2, true));
this.client1VM.invoke(() -> clientCache.close(true));
this.client2VM.invoke(() -> clientCache.close(true));
DistributedMember serverMember = this.managementTestRule.getDistributedMember(this.serverVM);
this.managerVM.invoke(() -> verifyClientStats(serverMember, port, 2));
this.managementTestRule.stopManager(this.managerVM);
}
use of org.apache.geode.distributed.DistributedMember in project geode by apache.
the class ClientHealthStatsDUnitTest method testClientHealthStats_SubscriptionDisabled.
@Test
public void testClientHealthStats_SubscriptionDisabled() throws Exception {
this.managementTestRule.createManager(this.managerVM, false);
this.managementTestRule.startManager(this.managerVM);
int port = this.serverVM.invoke(() -> createServerCache());
this.client1VM.invoke(() -> createClientCache(this.hostName, port, 1, false));
this.client2VM.invoke(() -> createClientCache(this.hostName, port, 2, false));
DistributedMember serverMember = this.managementTestRule.getDistributedMember(this.serverVM);
this.managerVM.invoke(() -> verifyClientStats(serverMember, port, 0));
this.managementTestRule.stopManager(this.managerVM);
}
use of org.apache.geode.distributed.DistributedMember 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);
}
});
}
Aggregations