Search in sources :

Example 1 with MockApplication

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);
}
Also used : MockApplication(io.confluent.ksql.rest.server.mock.MockApplication) HashMap(java.util.HashMap) KsqlRestConfig(io.confluent.ksql.rest.server.KsqlRestConfig) Before(org.junit.Before)

Aggregations

KsqlRestConfig (io.confluent.ksql.rest.server.KsqlRestConfig)1 MockApplication (io.confluent.ksql.rest.server.mock.MockApplication)1 HashMap (java.util.HashMap)1 Before (org.junit.Before)1