use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck 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());
}
Aggregations