use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdWarningAffectsConfigButNotService.
@Test
public void thresholdWarningAffectsConfigButNotService() {
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-warning", "99");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(99, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_WARNING).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertNotEquals(99, activeService.getOptions().getThresholdWarning());
}
use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdGoodAffectsConfigButNotService.
@Test
public void thresholdGoodAffectsConfigButNotService() {
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-good", "33");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(33, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_GOOD).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertNotEquals(33, activeService.getOptions().getThresholdGood());
}
use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdWarningDynamicAffectsConfigAndService.
@Test
public void thresholdWarningDynamicAffectsConfigAndService() {
ensureHealthChecksAreEnabled();
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-warning", "88", "--dynamic", "true");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(88, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_WARNING).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertEquals(88, activeService.getOptions().getThresholdWarning());
}
use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdCriticalAffectsConfigButNotService.
@Test
public void thresholdCriticalAffectsConfigButNotService() {
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-critical", "99");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(99, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_CRITICAL).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertNotEquals(99, activeService.getOptions().getThresholdCritical());
}
use of fish.payara.nucleus.healthcheck.preliminary.GarbageCollectorHealthCheck in project Payara by payara.
the class SetHealthCheckServiceConfigurationTest method thresholdGoodDynamicAffectsConfigAndService.
@Test
public void thresholdGoodDynamicAffectsConfigAndService() {
ensureHealthChecksAreEnabled();
CommandResult result = asadmin("set-healthcheck-service-configuration", "--service", "gc", "--enabled", "true", "--threshold-good", "22", "--dynamic", "true");
assertSuccess(result);
GarbageCollectorChecker gcConfig = config.getCheckerByType(garbageCollection.getCheckerType());
assertEquals(22, Integer.parseInt(gcConfig.getProperty(HealthCheckConstants.THRESHOLD_GOOD).getValue()));
GarbageCollectorHealthCheck activeService = (GarbageCollectorHealthCheck) service.getCheck(gcConfig.getName());
assertEquals(22, activeService.getOptions().getThresholdGood());
}
Aggregations