Search in sources :

Example 1 with ExecutionResult

use of org.apache.sling.hc.core.impl.executor.ExecutionResult in project sling by apache.

the class HealthCheckExecutorServletTest method getExecutionResults.

private List<HealthCheckExecutionResult> getExecutionResults(Result.Status worstStatus) {
    List<HealthCheckExecutionResult> results = new ArrayList<HealthCheckExecutionResult>();
    results.add(new ExecutionResult(new HealthCheckMetadata(hcServiceRef), new Result(worstStatus, worstStatus.name()), 100));
    results.add(new ExecutionResult(new HealthCheckMetadata(hcServiceRef), new Result(Result.Status.OK, "OK"), 100));
    return results;
}
Also used : HealthCheckMetadata(org.apache.sling.hc.util.HealthCheckMetadata) ArrayList(java.util.ArrayList) ExecutionResult(org.apache.sling.hc.core.impl.executor.ExecutionResult) HealthCheckExecutionResult(org.apache.sling.hc.api.execution.HealthCheckExecutionResult) HealthCheckExecutionResult(org.apache.sling.hc.api.execution.HealthCheckExecutionResult) ExecutionResult(org.apache.sling.hc.core.impl.executor.ExecutionResult) Result(org.apache.sling.hc.api.Result) HealthCheckExecutionResult(org.apache.sling.hc.api.execution.HealthCheckExecutionResult)

Aggregations

ArrayList (java.util.ArrayList)1 Result (org.apache.sling.hc.api.Result)1 HealthCheckExecutionResult (org.apache.sling.hc.api.execution.HealthCheckExecutionResult)1 ExecutionResult (org.apache.sling.hc.core.impl.executor.ExecutionResult)1 HealthCheckMetadata (org.apache.sling.hc.util.HealthCheckMetadata)1