use of org.apache.geode.test.dunit.rules.MemberVM in project geode by apache.
the class LuceneClusterConfigurationDUnitTest method indexGetsCreatedUsingClusterConfiguration.
@Test
public void indexGetsCreatedUsingClusterConfiguration() throws Exception {
Member vm1 = startNodeUsingClusterConfiguration(1);
// Connect Gfsh to locator.
gfshConnector.connectAndVerify(locator);
// Create lucene index.
createLuceneIndexUsingGfsh();
createRegionUsingGfsh(REGION_NAME, RegionShortcut.PARTITION, null);
// Start vm2. This should have lucene index created using cluster
// configuration.
MemberVM vm2 = startNodeUsingClusterConfiguration(2);
vm2.invoke(() -> {
LuceneService luceneService = LuceneServiceProvider.get(LocatorServerStartupRule.serverStarter.getCache());
final LuceneIndex index = luceneService.getIndex(INDEX_NAME, REGION_NAME);
assertNotNull(index);
validateIndexFields(new String[] { "field1", "field2", "field3" }, index);
});
}
use of org.apache.geode.test.dunit.rules.MemberVM in project geode by apache.
the class NetstatDUnitTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Exception {
Properties properties = new Properties();
// common properties
properties.setProperty("locators", "localhost[" + ports[0] + "]");
properties.setProperty("http-service-port", "0");
// start peer locator
properties.setProperty("start-locator", "localhost[" + ports[0] + "],peer=true,server=true");
properties.setProperty("jmx-manager-port", ports[1] + "");
lsRule.startServerVM(0, properties);
// start server with jmx Manager as well
properties.remove("start-locator");
properties.setProperty("jmx-manager-port", ports[2] + "");
MemberVM server = lsRule.startServerVM(1, properties);
// start server with no jmx Manager
properties.setProperty("jmx-manager", "false");
properties.setProperty("jmx-manager-port", "0");
properties.setProperty("jmx-manager-start", "false");
lsRule.startServerVM(2, properties);
// start another server
lsRule.startServerVM(3, properties);
netStatCommand = "netstat --with-lsof=false --member=" + server.getName();
netStatLsofCommand = "netstat --with-lsof=true --member=" + server.getName();
}
Aggregations