use of io.cdap.cdap.gateway.handlers.FileFetcherHttpHandlerInternal in project cdap by caskdata.
the class FileFetcherHttpHandlerInternalTest method setup.
@BeforeClass
public static void setup() throws Exception {
CConfiguration cConf = CConfiguration.create();
cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());
Injector injector = Guice.createInjector(new ConfigModule(cConf), new LocalLocationModule());
FileFetcherHttpHandlerInternal handler = injector.getInstance(FileFetcherHttpHandlerInternal.class);
httpService = NettyHttpService.builder("FileFetcherHttpHandlerInternalTest").setHttpHandlers(handler).setExceptionHandler(new HttpExceptionHandler()).build();
httpService.start();
InetSocketAddress addr = httpService.getBindAddress();
baseURL = new URL(String.format("http://%s:%d", addr.getHostName(), addr.getPort()));
}
Aggregations