@Override protected void configure() { bind(Configuration.class).toInstance(conf); } }
@BeforeClass public static void setupMemoryPluginStoreTest() throws Exception { conf = Configuration.create(); Injector injector = Guice.createInjector( new ConfigurationModule(conf), new TestStoreModule() ); store = injector.getInstance(MemoryPluginStore.class); }
@BeforeClass public static void setupTestClass() throws Exception { Configuration conf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(conf), new TestStoreModule() ); service = injector.getInstance(SQLPluginMetaStoreService.class); service.startAndWait(); }
@BeforeClass public static void setupClass() { Configuration conf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(conf), new TestStoreModule() ); store = injector.getInstance(SQLCredentialStore.class); store.startAndWait(); }
@BeforeClass public static void setupTestClass() { Configuration conf = Configuration.create(); Injector injector = Guice.createInjector( new ConfigurationModule(conf) ); provisionerRequestService = injector.getInstance(HttpProvisionerRequestService.class); stubProvisioner = new StubProvisioner(); stubProvisioner.startAndWait(); port = stubProvisioner.getBindAddress().getPort(); host = stubProvisioner.getBindAddress().getHostName(); }
@BeforeClass public static void beforeClass() throws SQLException, ClassNotFoundException { Configuration sqlConf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule() ); sqlStore = injector.getInstance(SQLEntityStoreService.class); sqlStore.startAndWait(); entityStoreService = sqlStore; }
@BeforeClass public static void setupTestClass() throws Exception { Configuration sqlConf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule() ); store = injector.getInstance(SQLProvisionerStore.class); store.startAndWait(); }
@BeforeClass public static void setupSQLNodeStoreTest() throws SQLException { Configuration sqlConf = BaseTest.createTestConf(); Injector injector = Guice.createInjector(new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule()); sqlNodeStoreService = injector.getInstance(SQLNodeStoreService.class); sqlNodeStoreService.startAndWait(); }
@BeforeClass public static void beforeClass() throws SQLException, ClassNotFoundException { Configuration sqlConf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule() ); sqlStore = injector.getInstance(SQLUserStore.class); sqlStore.startAndWait(); sqlStore.clearData(); }
@BeforeClass public static void beforeClass() throws SQLException, ClassNotFoundException { Configuration sqlConf = BaseTest.createTestConf(); Injector injector = Guice.createInjector( new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule() ); sqlStore = injector.getInstance(SQLTenantStore.class); sqlStore.startAndWait(); sqlStore.clearData(); store = sqlStore; }
@BeforeClass public static void setupSQLClusterStoreTest() throws Exception { Configuration sqlConf = BaseTest.createTestConf(); sqlConf.setLong(Constants.ID_START_NUM, 1); sqlConf.setLong(Constants.ID_INCREMENT_BY, 1); Injector injector = Guice.createInjector( new ConfigurationModule(sqlConf), new TestStoreModule(), new CodecModules().getModule() ); sqlClusterStoreService = injector.getInstance(SQLClusterStoreService.class); sqlClusterStoreService.startAndWait(); }
new ConfigurationModule(conf), new ZookeeperModule(zkClientService), new StoreModule(conf),
injector = Guice.createInjector( Modules.override( new ConfigurationModule(conf), new ZookeeperModule(zkClientService), new TestStoreModule(),