@AfterSuite(groups = "arquillian", inheritGroups = true, alwaysRun = true) public void arquillianAfterSuite() throws Exception { if (deployableTest.get() == null) { return; // beforeSuite failed } if (cycleStack.get().empty()) { return; } if (cycleStack.get().peek() != Cycle.BEFORE_SUITE) { return; // Arquillian lifecycle called out of order, expected " + Cycle.BEFORE_SUITE } else { cycleStack.get().pop(); } deployableTest.get().afterSuite(); deployableTest.get().shutdown(); deployableTest.set(null); deployableTest.remove(); cycleStack.set(null); cycleStack.remove(); }
void shutdown(TestRunnerAdaptor adaptor) { State.runnerFinished(); try { if (State.isLastRunner()) { try { if (adaptor != null) { adaptor.afterSuite(); adaptor.shutdown(); } } finally { State.clean(); } } setAdaptor(null); } catch (Exception e) { throw new RuntimeException("Could not run @AfterSuite", e); } }
private void shutdown() { try { if (State.isLastRunner()) { try { if (State.hasTestAdaptor()) { TestRunnerAdaptor adaptor = State.getTestAdaptor(); adaptor.afterSuite(); adaptor.shutdown(); } } finally { State.clean(); } } } catch (Exception e) { throw new RuntimeException("Could not run @AfterSuite", e); } } });
void shutdown(TestRunnerAdaptor adaptor) { State.runnerFinished(); try { if (State.isLastRunner()) { try { if (adaptor != null) { adaptor.afterSuite(); adaptor.shutdown(); } } finally { State.clean(); } } setAdaptor(null); } catch (Exception e) { throw new RuntimeException("Could not run @AfterSuite", e); } }
private void shutdown() { try { if (State.isLastRunner()) { try { if (State.hasTestAdaptor()) { TestRunnerAdaptor adaptor = State.getTestAdaptor(); adaptor.afterSuite(); adaptor.shutdown(); } } finally { State.clean(); } } } catch (Exception e) { throw new RuntimeException("Could not run @AfterSuite", e); } } });