@AfterMethod(groups = "slow") public void afterMethod() throws Exception { if (hasFailed()) { return; } lifecycle.fireShutdownSequencePriorEventUnRegistration(); busService.getBus().unregister(busHandler); lifecycle.fireShutdownSequencePostEventUnRegistration(); log.debug("afterMethod callcontext classLoader = " + (Thread.currentThread().getContextClassLoader() != null ? Thread.currentThread().getContextClassLoader().toString() : "null")); log.debug("DONE WITH TEST"); }
@BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } super.beforeMethod(); log.debug("beforeMethod callcontext classLoader = " + (Thread.currentThread().getContextClassLoader() != null ? Thread.currentThread().getContextClassLoader().toString() : "null")); //Thread.currentThread().setContextClassLoader(null); log.debug("RESET TEST FRAMEWORK"); controllerDispatcher.clearAll(); overdueConfigCache.loadDefaultOverdueConfig((OverdueConfig) null); clock.resetDeltaFromReality(); busHandler.reset(); // Start services lifecycle.fireStartupSequencePriorEventRegistration(); registerHandlers(); lifecycle.fireStartupSequencePostEventRegistration(); paymentPlugin.clear(); }
@BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } log.debug("RESET TEST FRAMEWORK"); cleanupAllTables(); clock.resetDeltaFromReality(); busHandler.reset(); lifecycle.fireStartupSequencePriorEventRegistration(); busService.getBus().register(busHandler); externalBus.register(new FakeKPMPlugin()); lifecycle.fireStartupSequencePostEventRegistration(); }
@Override @BeforeMethod(groups = "slow") public void beforeMethod() throws Exception { if (hasFailed()) { return; } /* We copy the initialization instead of invoking the super method so we can add the registration of the publicBus event; TODO modify sequence to allow optional registration of publicListener */ cleanupAllTables(); log.debug("RESET TEST FRAMEWORK"); controllerDispatcher.clearAll(); overdueConfigCache.loadDefaultOverdueConfig((OverdueConfig) null); clock.resetDeltaFromReality(); busHandler.reset(); // Start services publicListener = new PublicListener(); lifecycle.fireStartupSequencePriorEventRegistration(); busService.getBus().register(busHandler); externalBus.register(publicListener); lifecycle.fireStartupSequencePostEventRegistration(); paymentPlugin.clear(); this.externalBusCount = new AtomicInteger(0); }