use of io.confluent.ksql.rest.server.mock.MockApplication in project ksql by confluentinc.
the class KsqlRestClientTest method init.
@Before
public void init() throws Exception {
final int port = TestUtils.randomFreeLocalPort();
Map<String, Object> props = new HashMap<>();
props.put(KsqlRestConfig.LISTENERS_CONFIG, "http://localhost:" + port);
props.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");
props.put(StreamsConfig.APPLICATION_ID_CONFIG, "ksql_config_test");
ksqlRestConfig = new KsqlRestConfig(props);
mockApplication = new MockApplication(ksqlRestConfig);
mockApplication.start();
ksqlRestClient = new KsqlRestClient("http://localhost:" + port);
}
Aggregations