use of org.apache.gobblin.service.monitoring.FlowStatusGenerator in project incubator-gobblin by apache.
the class FlowStatusTest method setUp.
@BeforeClass
public void setUp() throws Exception {
ConfigBuilder configBuilder = ConfigBuilder.create();
JobStatusRetriever jobStatusRetriever = new TestJobStatusRetriever();
final FlowStatusGenerator flowStatusGenerator = FlowStatusGenerator.builder().jobStatusRetriever(jobStatusRetriever).build();
Injector injector = Guice.createInjector(new Module() {
@Override
public void configure(Binder binder) {
binder.bind(FlowStatusGenerator.class).annotatedWith(Names.named(FlowStatusResource.FLOW_STATUS_GENERATOR_INJECT_NAME)).toInstance(flowStatusGenerator);
}
});
_server = EmbeddedRestliServer.builder().resources(Lists.<Class<? extends BaseResource>>newArrayList(FlowStatusResource.class)).injector(injector).build();
_server.startAsync();
_server.awaitRunning();
_client = new FlowStatusClient(String.format("http://localhost:%s/", _server.getPort()));
messageJoiner = Joiner.on(FlowStatusResource.MESSAGE_SEPARATOR);
}
Aggregations