use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherTest method testSetAndGetHostnameForClients.
@Test
public void testSetAndGetHostnameForClients() {
final Builder builder = new Builder();
assertNull(builder.getHostNameForClients());
assertSame(builder, builder.setHostNameForClients("Pegasus"));
assertEquals("Pegasus", builder.getHostNameForClients());
}
use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherTest method testSetAndGetCriticalHeapPercentage.
@Test
public void testSetAndGetCriticalHeapPercentage() {
Builder builder = new Builder();
assertNull(builder.getCriticalHeapPercentage());
assertSame(builder, builder.setCriticalHeapPercentage(55.5f));
assertEquals(55.5f, builder.getCriticalHeapPercentage().floatValue(), 0.0f);
assertSame(builder, builder.setCriticalHeapPercentage(null));
assertNull(builder.getCriticalHeapPercentage());
}
use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherTest method testBuildWithMemberNameSetInApiPropertiesOnStart.
@Test
public void testBuildWithMemberNameSetInApiPropertiesOnStart() {
ServerLauncher launcher = new Builder().setCommand(ServerLauncher.Command.START).set(NAME, "serverABC").build();
assertNotNull(launcher);
assertEquals(ServerLauncher.Command.START, launcher.getCommand());
assertNull(launcher.getMemberName());
assertEquals("serverABC", launcher.getProperties().getProperty(NAME));
}
use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherTest method testSetAndGetServerPort.
@Test
public void testSetAndGetServerPort() {
Builder builder = new Builder();
assertEquals(ServerLauncher.DEFAULT_SERVER_PORT, builder.getServerPort());
assertSame(builder, builder.setServerPort(0));
assertEquals(0, builder.getServerPort().intValue());
assertSame(builder, builder.setServerPort(1));
assertEquals(1, builder.getServerPort().intValue());
assertSame(builder, builder.setServerPort(80));
assertEquals(80, builder.getServerPort().intValue());
assertSame(builder, builder.setServerPort(1024));
assertEquals(1024, builder.getServerPort().intValue());
assertSame(builder, builder.setServerPort(65535));
assertEquals(65535, builder.getServerPort().intValue());
assertSame(builder, builder.setServerPort(null));
assertEquals(ServerLauncher.DEFAULT_SERVER_PORT, builder.getServerPort());
}
use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherTest method testSetAndGetMaxConnections.
@Test
public void testSetAndGetMaxConnections() {
Builder builder = new Builder();
assertNull(builder.getMaxConnections());
assertSame(builder, builder.setMaxConnections(1000));
assertEquals(1000, builder.getMaxConnections().intValue());
assertSame(builder, builder.setMaxConnections(null));
assertNull(builder.getMaxConnections());
}
Aggregations