use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdGoodBelowMinimumCausesError.
@Test
public void thresholdGoodBelowMinimumCausesError() {
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-good", "-1");
assertUnacceptableParameter("thresholdGood", result);
assertContains("Good threshold is a percentage so must be greater than zero", result.getOutput());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdCriticalDynamicAffectsConfigAndService.
@Test
public void thresholdCriticalDynamicAffectsConfigAndService() {
ensureHealthChecksAreEnabled();
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-critical", "88", "--dynamic", "true");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(88, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_CRITICAL).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertEquals(88, activeService.getOptions().getThresholdCritical());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHazelcastConfigurationTest method autoIncrementPort.
@Test
public void autoIncrementPort() {
CommandResult result = asadmin("set-hazelcast-configuration", "--autoIncrementPort", "true");
assertSuccess(result);
assertTrue(config.getAutoIncrementPort());
result = asadmin("set-hazelcast-configuration", "--autoIncrementPort", "false");
assertSuccess(result);
assertFalse(config.getAutoIncrementPort());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHazelcastConfigurationTest method dataGridEncryptionWarning.
@Test
public void dataGridEncryptionWarning() {
CommandResult result = asadmin("set-hazelcast-configuration", "--encryptdatagrid", "true");
assertWarning(result);
assertContains("Could not find datagrid-key", result.getOutput());
result = asadmin("set-hazelcast-configuration", "--encryptdatagrid", "false");
assertSuccess(result);
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckNotifierConfigurationTest method notifierNamesAreAccepted.
@Test
public void notifierNamesAreAccepted() {
final String[] names;
if (ServerOperations.isServer()) {
names = new String[] { "log-notifier", "jms-notifier", "cdieventbus-notifier", "eventbus-notifier" };
} else {
names = new String[] { "log-notifier", "cdieventbus-notifier", "eventbus-notifier" };
}
for (String notiferName : names) {
CommandResult result = asadmin("set-healthcheck-configuration", "--enableNotifiers", notiferName, "--enabled", "true");
// just check the name got accepted
assertSuccess(result);
}
}
Aggregations