private boolean runSetup(final NODE_TYPE node, final RootNodeExecutionContext context) { try { context.getSetupAndTeardown().runSetup(getScope(), node); return true; } catch (final Throwable t) { log.warn("setup failed", t); context.addFailure(new SubstepExecutionFailure(t, node, true)); context.getNotificationDistributor().onNodeFailed(node, t); return false; } }
context.getNotificationDistributor().onNodeFinished(node); SubstepExecutionFailure.setResult(e, node, ExecutionResult.FAILED); context.getNotificationDistributor().onNodeFailed(node, e); rootNodeStateSet = true; break; SubstepExecutionFailure.setResult(e, node, ExecutionResult.NON_CRITICAL_FAILURE); context.getNotificationDistributor().onNodeFailed(node, e); rootNodeStateSet = true; context.getNotificationDistributor().onNodeFinished(node);
private boolean beforeExecute(final NODE_TYPE node, final RootNodeExecutionContext context) { boolean shouldContinue; if (node.hasError()) { context.getNotificationDistributor().onNodeFailed(node, node.getResult().getThrown()); context.addFailure(new SubstepExecutionFailure(node.getResult().getThrown(), node)); shouldContinue = false; } else { node.getResult().setStarted(); context.getNotificationDistributor().onNodeStarted(node); shouldContinue = runSetup(node, context); } if (!shouldContinue) { log.debug("shouldContinue = false for {}", node); } return shouldContinue; }
private boolean beforeExecute(final NODE_TYPE node, final RootNodeExecutionContext context) { boolean shouldContinue = true; // node.getResult().setStarted(); if (node.hasError()) { context.getNotificationDistributor().onNodeFailed(node, node.getResult().getThrown()); context.addFailure(new SubstepExecutionFailure(node.getResult().getThrown(), node)); shouldContinue = false; } else { node.getResult().setStarted(); context.getNotificationDistributor().onNodeStarted(node); shouldContinue = runSetup(node, context); } if (!shouldContinue) { log.debug("shouldContinue = false for {}", node); } return shouldContinue; }
context.getNotificationDistributor().onNodeFinished(node); context.getNotificationDistributor().onNodeFailed(node, lastException);
context.getNotificationDistributor().onNodeFinished(node); context.getNotificationDistributor().onNodeFailed(node, lastException);
context.getNotificationDistributor().onNodeFinished(node); SubstepExecutionFailure sef = new SubstepExecutionFailure(e, node, ExecutionResult.FAILED); context.getNotificationDistributor().onNodeFailed(node, e); rootNodeStateSet = true; break; context.getNotificationDistributor().onNodeFinished(node);