use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckConfigurationTest method historicalTraceStoreSizeDynamicAffectsConfigAndService.
@Test
public void historicalTraceStoreSizeDynamicAffectsConfigAndService() {
CommandResult result = asadmin("set-healthcheck-configuration", "--enabled", "true", "--historical-trace-store-size", "13", "--dynamic", "true");
assertSuccess(result);
assertEquals(13, Integer.parseInt(config.getHistoricalTraceStoreSize()));
assertEquals(13, service.getHistoricalTraceStoreSize().intValue());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckConfigurationTest method historicalTraceEnabledDynamicAffectsConfigAndService.
@Test
public void historicalTraceEnabledDynamicAffectsConfigAndService() {
CommandResult result = asadmin("set-healthcheck-configuration", "--enabled", "true", "--historical-trace-enabled", "true", "--dynamic", "true");
assertSuccess(result);
assertTrue(service.isHistoricalTraceEnabled());
result = asadmin("set-healthcheck-configuration", "--enabled", "true", "--historical-trace-enabled", "false", "--dynamic", "true");
assertSuccess(result);
assertFalse(service.isHistoricalTraceEnabled());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckConfigurationTest method enabledDynamicAffectsConfigAndService.
@Test
public void enabledDynamicAffectsConfigAndService() {
CommandResult result = asadmin("set-healthcheck-configuration", "--enabled", "true", "--dynamic", "true");
assertSuccess(result);
assertTrue(service.isEnabled());
result = asadmin("set-healthcheck-configuration", "--enabled", "false", "--dynamic", "true");
assertSuccess(result);
assertFalse(service.isEnabled());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckConfigurationTest method historicalTraceStoreSizeAffectsConfigButNotService.
@Test
public void historicalTraceStoreSizeAffectsConfigButNotService() {
Integer historicalTraceStoreSize = service.getHistoricalTraceStoreSize();
CommandResult result = asadmin("set-healthcheck-configuration", "--enabled", "true", "--historical-trace-store-size", "13");
assertSuccess(result);
assertEquals(13, Integer.parseInt(config.getHistoricalTraceStoreSize()));
assertEquals(historicalTraceStoreSize, service.getHistoricalTraceStoreSize());
}
use of org.glassfish.embeddable.CommandResult in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method hogginThreadsThresholdDynamicAffectsConfigAndService.
@Test
public void hogginThreadsThresholdDynamicAffectsConfigAndService() {
ensureHealthChecksAreEnabled();
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "ht", "--enabled", "true", "--hogging-threads-threshold", "42", "--dynamic", "true");
assertSuccess(result);
HoggingThreadsChecker htConfig = config.getCheckerByType(hoggingThreads.getCheckerType());
assertEquals(42, Integer.parseInt(htConfig.getThresholdPercentage()));
HoggingThreadsHealthCheck checkTask = (HoggingThreadsHealthCheck) service.getCheck(htConfig.getName());
assertEquals(Long.valueOf(42), checkTask.getOptions().getThresholdPercentage());
}
Aggregations