use of io.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.strictConfig().setRequiredConfigurationProperties(properties).doNotInitializeLogging().initialize();
lifeCycleManager = injector.getInstance(LifeCycleManager.class);
store = injector.getInstance(BackupStore.class);
}
Aggregations