use of com.facebook.airlift.bootstrap.Bootstrap in project presto by prestodb.
the class TestHttpBackupStore method setup.
@BeforeMethod
public void setup() throws Exception {
temporary = createTempDir();
Map<String, String> properties = ImmutableMap.<String, String>builder().put("backup.http.uri", "http://localhost:8080").build();
Bootstrap app = new Bootstrap(new TestingNodeModule(), new TestingHttpServerModule(), new JsonModule(), new JaxrsModule(true), binder -> jaxrsBinder(binder).bind(TestingHttpBackupResource.class), override(new HttpBackupModule()).with(new TestingModule()));
Injector injector = app.setRequiredConfigurationProperties(properties).doNotInitializeLogging().quiet().initialize();
lifeCycleManager = injector.getInstance(LifeCycleManager.class);
store = injector.getInstance(BackupStore.class);
}
Aggregations