private void closeDataProviders(Object[] dataProviders) { if (action(runStatus) == ABORT) return; if (dataProviders == null) return; // there was an error creating the providers for (Object provider : dataProviders) { GroovyRuntimeUtil.invokeMethodQuietly(provider, "close"); } }
public void doRunCleanup(SpecInfo spec) { if (spec.getIsBottomSpec()) { runIterationCleanups(); if (action(runStatus) == ABORT) return; } for (MethodInfo method : spec.getCleanupMethods()) { if (action(runStatus) == ABORT) return; invoke(currentInstance, method); } runCleanup(spec.getSuperSpec()); }
private void runIterationCleanups() { for (Runnable cleanup : currentIteration.getCleanups()) { if (action(runStatus) == ABORT) return; try { cleanup.run(); } catch (Throwable t) { ErrorInfo error = new ErrorInfo(CollectionUtil.getFirstElement(spec.getCleanupMethods()), t); runStatus = supervisor.error(error); } } }
public void doRunCleanupSpec(SpecInfo spec) { for (MethodInfo method : spec.getCleanupSpecMethods()) { if (action(runStatus) == ABORT) return; invoke(currentInstance, method); } runCleanupSpec(spec.getSuperSpec()); }