Search in sources :

Example 1 with MockKafkaTopicClient

use of io.confluent.ksql.rest.server.mock.MockKafkaTopicClient in project ksql by confluentinc.

the class StatementExecutorTest method setUp.

@Before
public void setUp() {
    Map<String, Object> props = new HashMap<>();
    props.put("application.id", "ksqlStatementExecutorTest");
    props.put("bootstrap.servers", CLUSTER.bootstrapServers());
    ksqlEngine = new KsqlEngine(new KsqlConfig(props), new MockKafkaTopicClient());
    StatementParser statementParser = new StatementParser(ksqlEngine);
    statementExecutor = new StatementExecutor(ksqlEngine, statementParser);
}
Also used : KsqlEngine(io.confluent.ksql.KsqlEngine) StatementParser(io.confluent.ksql.rest.server.StatementParser) HashMap(java.util.HashMap) MockKafkaTopicClient(io.confluent.ksql.rest.server.mock.MockKafkaTopicClient) KsqlConfig(io.confluent.ksql.util.KsqlConfig) Before(org.junit.Before)

Example 2 with MockKafkaTopicClient

use of io.confluent.ksql.rest.server.mock.MockKafkaTopicClient in project ksql by confluentinc.

the class KsqlResourceTest method setUp.

@Before
public void setUp() throws IOException, RestClientException {
    SchemaRegistryClient schemaRegistryClient = new MockSchemaRegistryClient();
    registerSchema(schemaRegistryClient);
    ksqlRestConfig = new KsqlRestConfig(TestKsqlResourceUtil.getDefaultKsqlConfig());
    KsqlConfig ksqlConfig = new KsqlConfig(ksqlRestConfig.getKsqlConfigProperties());
    ksqlEngine = new KsqlEngine(ksqlConfig, new MockKafkaTopicClient(), schemaRegistryClient, new MetaStoreImpl());
}
Also used : KsqlEngine(io.confluent.ksql.KsqlEngine) MockSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient) KsqlRestConfig(io.confluent.ksql.rest.server.KsqlRestConfig) MockKafkaTopicClient(io.confluent.ksql.rest.server.mock.MockKafkaTopicClient) MetaStoreImpl(io.confluent.ksql.metastore.MetaStoreImpl) KsqlConfig(io.confluent.ksql.util.KsqlConfig) SchemaRegistryClient(io.confluent.kafka.schemaregistry.client.SchemaRegistryClient) MockSchemaRegistryClient(io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient) Before(org.junit.Before)

Aggregations

KsqlEngine (io.confluent.ksql.KsqlEngine)2 MockKafkaTopicClient (io.confluent.ksql.rest.server.mock.MockKafkaTopicClient)2 KsqlConfig (io.confluent.ksql.util.KsqlConfig)2 Before (org.junit.Before)2 MockSchemaRegistryClient (io.confluent.kafka.schemaregistry.client.MockSchemaRegistryClient)1 SchemaRegistryClient (io.confluent.kafka.schemaregistry.client.SchemaRegistryClient)1 MetaStoreImpl (io.confluent.ksql.metastore.MetaStoreImpl)1 KsqlRestConfig (io.confluent.ksql.rest.server.KsqlRestConfig)1 StatementParser (io.confluent.ksql.rest.server.StatementParser)1 HashMap (java.util.HashMap)1