@Override public ConditionEvaluationResult call() throws Exception { try { return conditionEvaluator.eval(delayed); } catch (Throwable e) { if (conditionSettings.shouldExceptionBeIgnored(e)) { return new ConditionEvaluationResult(false, null, e); } return new ConditionEvaluationResult(false, e, null); } } }
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { lastResult = supplier.call(); boolean matches = matcher.matches(lastResult); if (matches) { conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(supplier, matcher), lastResult, pollInterval); } else { conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(supplier, matcher), lastResult, pollInterval); } return new ConditionEvaluationResult(matches); } };
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { try { supplier.run(); conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(supplier, settings.getAlias()), null, pollInterval); return new ConditionEvaluationResult(true); } catch (AssertionError e) { lastExceptionMessage = e.getMessage(); conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(supplier, lastExceptionMessage, settings.getAlias(), true), null, pollInterval); return new ConditionEvaluationResult(false, null, e); } catch (Throwable throwable) { return CheckedExceptionRethrower.safeRethrow(throwable); } } };
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { boolean conditionFulfilled = matcher.call(); if (conditionFulfilled) { conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(matcher, settings.getAlias()), true, pollInterval); } else { conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(matcher, settings.getAlias()), false, pollInterval); } return new ConditionEvaluationResult(conditionFulfilled); }
succeededBeforeTimeout = maxWaitTime.compareTo(evaluationDuration) > 0; } catch (TimeoutException e) { lastResult = new ConditionEvaluationResult(false, null, e); } catch (ExecutionException e) { lastResult = new ConditionEvaluationResult(false, e.getCause(), null); } catch (Throwable e) { lastResult = new ConditionEvaluationResult(false, e, null); } finally { if (currentConditionEvaluation != null) {
@Override public ConditionEvaluationResult call() throws Exception { try { return conditionEvaluator.eval(delayed); } catch (Throwable e) { if (conditionSettings.shouldExceptionBeIgnored(e)) { return new ConditionEvaluationResult(false, null, e); } return new ConditionEvaluationResult(false, e, null); } } }
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { lastResult = supplier.call(); boolean matches = matcher.matches(lastResult); if (matches) { conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(supplier, matcher), lastResult, pollInterval); } else { conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(supplier, matcher), lastResult, pollInterval); } return new ConditionEvaluationResult(matches); } };
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { try { supplier.run(); conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(supplier, settings.getAlias()), null, pollInterval); return new ConditionEvaluationResult(true); } catch (AssertionError e) { lastExceptionMessage = e.getMessage(); conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(supplier, lastExceptionMessage, settings.getAlias(), true), null, pollInterval); return new ConditionEvaluationResult(false, null, e); } catch (Throwable throwable) { return CheckedExceptionRethrower.safeRethrow(throwable); } } };
public ConditionEvaluationResult eval(Duration pollInterval) throws Exception { boolean conditionFulfilled = matcher.call(); if (conditionFulfilled) { conditionEvaluationHandler.handleConditionResultMatch(getMatchMessage(matcher, settings.getAlias()), true, pollInterval); } else { conditionEvaluationHandler.handleConditionResultMismatch(getMismatchMessage(matcher, settings.getAlias()), false, pollInterval); } return new ConditionEvaluationResult(conditionFulfilled); }
succeededBeforeTimeout = maxWaitTime.compareTo(evaluationDuration) > 0; } catch (TimeoutException e) { lastResult = new ConditionEvaluationResult(false, null, e); } catch (ExecutionException e) { lastResult = new ConditionEvaluationResult(false, e.getCause(), null); } catch (Throwable e) { lastResult = new ConditionEvaluationResult(false, e, null); } finally { if (currentConditionEvaluation != null) {