@Test public void testInitializeDeploymentsExceededTheRetries() throws Exception { prepareExecutor(); dataSourceRuntimeMangerHasStartedFailures = RETRIES; dataSourceManagementBootstrap.init(); verify(scheduler, times((int) RETRIES)) .schedule(any(Runnable.class), eq(DELAY), eq(TimeUnit.MILLISECONDS)); verify(dataSourceRuntimeManager, times((int) RETRIES)).hasStarted(); verify(driverDefDeployer, never()).deployGlobalDefs(); verify(dataSourceDefDeployer, never()).deployGlobalDefs(); verify(scheduler, times(1)).shutdown(); }
@PostConstruct public void init() { initializeConfigParams(); initializeDefChangeHandler(); driverInitializer.initializeDefaultDrivers(); scheduler.schedule(getInitializeDeploymentsTask(), deploymentsInitializationDelay, TimeUnit.MILLISECONDS); }
DataSourceManagementBootstrap { @PostConstruct public void init() { initializeConfigParams(); initializeDefChangeHandler(); driverInitializer.initializeDefaultDrivers(); scheduler.schedule(getInitializeDeploymentsTask(), deploymentsInitializationDelay, TimeUnit.MILLISECONDS); } }
DataSourceManagementBootstrap { @PostConstruct public void init() { initializeConfigParams(); initializeDefChangeHandler(); driverInitializer.initializeDefaultDrivers(); scheduler.schedule(getInitializeDeploymentsTask(), deploymentsInitializationDelay, TimeUnit.MILLISECONDS); } DataSourceManagementBootstrap(); @Inject  DataSourceManagementBootstrap(DataSourceRuntimeManager dataSourceRuntimeManager,
                                         DataSourceDefDeployer dataSourceDefDeployer,
                                         DriverDefDeployer driverDefDeployer,
                                         DefaultDriverInitializer driverInitializer,
                                         DefResourceChangeObserver defResourceChangeObserver,
                                         BeanManager beanManager); }
DataSourceManagementBootstrap { @PostConstruct public void init() { initializeConfigParams(); initializeDefChangeHandler(); driverInitializer.initializeDefaultDrivers(); scheduler.schedule(getInitializeDeploymentsTask(), deploymentsInitializationDelay, TimeUnit.MILLISECONDS); } DataSourceManagementBootstrap(); @Inject  DataSourceManagementBootstrap(DataSourceRuntimeManager dataSourceRuntimeManager,
                                         DataSourceDefDeployer dataSourceDefDeployer,
                                         DriverDefDeployer driverDefDeployer,
                                         DefaultDriverInitializer driverInitializer,
                                         DefResourceChangeObserver defResourceChangeObserver,
                                         BeanManager beanManager); @PostConstruct void init(); @PreDestroy void destroy(); }
DataSourceManagementBootstrap { @PostConstruct public void init() { initializeConfigParams(); initializeDefChangeHandler(); driverInitializer.initializeDefaultDrivers(); scheduler.schedule(getInitializeDeploymentsTask(), deploymentsInitializationDelay, TimeUnit.MILLISECONDS); } DataSourceManagementBootstrap(); @Inject  DataSourceManagementBootstrap(DataSourceRuntimeManager dataSourceRuntimeManager,
                                         DataSourceDefDeployer dataSourceDefDeployer,
                                         DriverDefDeployer driverDefDeployer,
                                         DefaultDriverInitializer driverInitializer,
                                         DefResourceChangeObserver defResourceChangeObserver,
                                         BeanManager beanManager); @PostConstruct void init(); @PreDestroy void destroy(); static final String DEPLOYMENTS_INITIALIZATION_RETRIES; static final String DEPLOYMENTS_INITIALIZATION_DELAY; static final String DEF_CHANGE_HANDLER_BEAN; }